{ "openapi": "3.0.0", "info": { "title": "Social+ Cloud SDK", "description": "## Using Social+ APIs\n\nOur API documentation explains all API endpoints used in Social+ Cloud. All APIs, with the exception of some authentication APIs, require an access token for authentication and authorization. APIs can be used either in Admin or User context. When used in user context, you will only be able to fetch data related to that user only.\nFor Administrators who are using our API documentation in making server-to-server API calls, you need an Admin Access token to connect to the Social+ server. Refer to\n[this documentation](https://docs.social.plus/console/settings#admin-api-access-token)\nfor the instructions on how to generate an admin access token.\n\nAll backend endpoints that support Social+ Cloud SDK are included here. To easily differentiate the type of each endpoint, we added a prefix in each endpoint's path.\n\n- REST API Endpoint: **`/v1, /v2, /v3, /v4, or /v5 ...`**\n- Webhook Event: **`/webhook ...`**\n\n---\n\n## **Schema Definitions**\n\nThis section provides detailed descriptions of the key schemas used in Social+ Cloud. Understanding these schemas is essential for effectively integrating our features into your applications. Each schema entry includes a concise description and highlights its core functionality and relationships within the platform. These definitions will help you grasp the structure and purpose of various components, ensuring a seamless and efficient development experience.\n\n### **User**\n\nA User represents an individual who interacts with the Social+ Cloud. Users can create profiles, join communities, post content, comment, react, and engage with other users.\n\n### **Role**\n\nA Role defines the permissions and access levels for Users within the Social+ Cloud. Roles can be assigned to manage and moderate content, ensuring a controlled and safe environment for all users.\n\n### **Channel**\n\nA Channel is a primary structure used to implement various chat messaging capabilities within an application. Channels serve as containers for Subchannels, enabling a hierarchical organization of conversations. This structure allows developers to manage and navigate different chat threads efficiently.\n\n### **Subchannel**\n\nA Subchannel is a subdivision within a Channel for specific conversation threads. Subchannels host all messages and interactions, providing organized discussions within a larger channel. Users can individually create, update, delete, and manage subchannels. Moderation actions, such as banning and muting, are applied at the channel level, affecting all subchannels.\n\n### **ChannelUser**\n\nA ChannelUser represents an individual user within a specific Channel. This schema tracks user participation, roles, and permissions within the channel. Each ChannelUser can interact in subchannels, participate in discussions, and engage with other members. Users can be assigned roles with varying permissions, such as admin, moderator, or member, allowing for tailored access and control. Moderation actions like banning or muting a ChannelUser affect their participation across all subchannels within the channel.\n\n### **Message**\n\nA Message facilitates real-time communication among channel users. Messages can contain up to 20,000 characters or weigh up to 100KB for custom content. For larger binary data, such as files, it's recommended to upload the data to a cloud storage service like AWS S3 and include the URL in the message. The SDK supports various message types, including text and image, built on a standard message layer.\n\n### **Community**\n\nA Community is a feature that allows users to share their posts and comments and engage with each other within the app. Communities provide a dedicated space for discussing specific topics or interests.\n\n### **CommunityUser**\n\nA CommunityUser represents an individual user within a specific Community. This schema tracks user participation, roles, and interactions within the community. CommunityUsers can join public or private communities, participate in discussions, and engage with other members. Each user can have different roles with varying permissions, such as admin, moderator, or member, which control their access and actions within the community. Moderation actions, like banning or muting, can be applied to CommunityUsers to maintain a safe and respectful environment.\n\n### **CommunityCategory**\n\nA CommunityCategory helps organize and manage communities by categorizing them into specific groups. This categorization allows users to easily sort and filter communities based on their interests or needs.\n\n### **Post**\n\nA Post is a piece of content created and shared by a user within a network or community. Posts can include text, images, videos, or other elements. Users can create, view, and interact with posts in a social feed, which can be displayed in chronological order and customized using various settings. Post types supported by Social+ include text, image, video, file, live stream, poll, and custom posts. The parent post serves as a container for text data, while each multimedia element (e.g., image, video) is treated as a separate child post. Both parent and child posts support reactions and comments, allowing users to engage comprehensively with content.\n\n### **Comment**\n\nA Comment in Social+ Cloud is a user-generated response to specific content, such as a post or story. Comments enable users to engage in conversations, express thoughts, opinions, and emotions, fostering a sense of community around the content.\n\n**Comment Reference Types:**\n\n- **Post Type Comment:** Designed for regular posts like text updates, photos, or videos. These comments are associated with the post and displayed beneath it, promoting conversation and interaction.\n- **Story Type Comment:** Similar to post type comments but associated with stories, driving user engagement and discussion around short-lived content.\n- **Content Type Comment:** Intended for content-specific such as articles or specialized content, providing a more organized and contextual commenting experience.\n\n### **Reaction**\n\nA Reaction is a user interaction on messages, posts, or comments, such as like, dislike, or love. The type of reactions is customizable. Currently, reactions are supported for Posts, Messages, and Comments.\n\n**Reaction Reference Types:**\n\n- **Comment Reference Type:** Allows users to query reactions on a specific comment, showing how others have responded to it.\n- **Post Reference Type:** Allows users to query reactions on a specific post, highlighting user engagement with the post.\n- **Story Reference Type:** Allows users to query reactions on a specific story, showing user reactions to the story.\n\n### **File**\n\nA File in Social+ Cloud supports file upload and download, enabling file-sharing within applications. It handles various file types, including images, videos, audio, and documents, with a maximum size of 1 GB. This functionality allows users to share files directly in chats or social feeds, enhancing engagement and interaction.\n\n### **Follow**\n\nA Follow schema in Social+ Cloud defines one-directional relationships between users, essential for social networking features. When user A follows user B, user A can see user B's updates in their feed, but user B does not need to reciprocate. This schema helps manage visibility and accessibility of user-generated content in user feeds.\n\n---\n\n## Select Region Endpoint\n\nBefore making server-to-server API calls, be sure to select the correct API endpoint for your region in the **Servers** dropdown below.\n", "version": "4.115.1" }, "servers": [ { "url": "https://apix.us.amity.co", "description": "API Endpoint for US Region" }, { "url": "https://apix.eu.amity.co", "description": "API Endpoint for EU Region" }, { "url": "https://apix.sg.amity.co", "description": "API Endpoint for SG Region" } ], "paths": { "/api/v1/admin-token": { "post": { "summary": "Generate admin access token", "description": "Generate admin access token by using existing admin token, once perform will invalidate previous token respect the expiresInHours parameter in network settings.\n", "tags": [ "Admin" ], "security": [ { "BearerAuth": [ "admin" ] } ], "responses": { "200": { "description": "Admin access token information", "content": { "application/json": { "schema": { "description": "Admin access token response payload", "type": "object", "properties": { "adminToken": { "type": "string", "description": "The generated admin access token" }, "issuedAt": { "type": "string", "format": "date-time", "description": "The time when the token was issued" }, "expiresAt": { "type": "string", "format": "date-time", "description": "The time when the token will expire" } } } } } } } } }, "/api/v1/ads/me": { "get": { "summary": "Query all network ads and settings", "tags": [ "Ads" ], "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "All ads information and ads settings", "content": { "application/json": { "schema": { "description": "Query ads response payload", "type": "object", "properties": { "ads": { "type": "array", "items": { "type": "object", "properties": { "adId": { "type": "string" }, "advertiserId": { "type": "string", "description": "ID of an advertiser." }, "name": { "type": "string", "maxLength": 100, "description": "Name of an ad." }, "placements": { "type": "array", "description": "The placements of the advertisement.", "items": { "type": "string", "enum": [ "feed", "story", "comment", "chatList", "chat" ] } }, "headline": { "type": "string", "maxLength": 70 }, "description": { "type": "string", "maxLength": 40 }, "body": { "type": "string", "maxLength": 180 }, "image1_1": { "type": "string", "description": "File ID of an image with 1:1 aspect ratio." }, "image9_16": { "type": "string", "description": "File ID of an image with 9:16 aspect ratio." }, "callToAction": { "type": "string", "maxLength": 20, "description": "The call to action text of the advertisement." }, "callToActionUrl": { "type": "string", "maxLength": 1000, "description": "The URL of the call to action." }, "targets": { "type": "object", "properties": { "communityIds": { "type": "array", "items": { "type": "string" }, "maxItems": 20 } } }, "startAt": { "type": "string", "format": "date-time" }, "endAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "advertisers": { "type": "array", "items": { "type": "object", "properties": { "advertiserId": { "type": "string" }, "name": { "type": "string", "maxLength": 200 }, "companyName": { "type": "string", "maxLength": 200 }, "avatarFileId": { "type": "string", "description": "File ID of an advertiser's avatar." }, "adsCount": { "type": "number", "description": "Number of ads created by the advertiser.", "default": 0 }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "settings": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "maxActiveAds": { "type": "number", "default": 500 }, "frequency": { "type": "object", "properties": { "feed": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "fixed", "time-window" ] }, "value": { "type": "number", "format": "number", "minimum": 1, "maximum": 65535, "default": 5 } } }, "story": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "fixed", "time-window" ] }, "value": { "type": "number", "minimum": 1, "maximum": 65535, "default": 4 } } }, "comment": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "fixed", "time-window" ] }, "value": { "type": "number", "minimum": 1, "maximum": 65535, "default": 10 } } } } } } } } } } } } } } }, "/api/v1/archives/channels": { "get": { "summary": "Query all archived channels", "tags": [ "Archive" ], "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "List of archived channels", "content": { "application/json": { "schema": { "description": "Archive Channel Information", "type": "object", "properties": { "archives": { "type": "array", "items": { "type": "object", "properties": { "channelId": { "type": "string", "description": "Channel ID" }, "archivedAt": { "type": "string", "description": "Date of the archive", "format": "date-time", "example": "2022-07-07T04:24:20.444Z" } } } } } } } } } } } }, "/api/v1/archives/channels/{channelId}": { "post": { "summary": "Archive channels", "tags": [ "Archive" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-f\\d]{24}$", "example": "60e4b1b4b3b2b5c4c4b3b2b5" } } ], "responses": { "200": { "description": "List of archived channels", "content": { "application/json": { "schema": { "description": "Archive Channel Information", "type": "object", "properties": { "channelId": { "type": "string", "description": "Channel ID" }, "archivedAt": { "type": "string", "description": "Date of the archive", "format": "date-time", "example": "2022-07-07T04:24:20.444Z" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } } } }, "delete": { "summary": "Unarchive channels", "tags": [ "Archive" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-f\\d]{24}$", "example": "60e4b1b4b3b2b5c4c4b3b2b5" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } } } } }, "/api/v1/analytics/activities": { "post": { "summary": "send analytic activities", "description": "Send a batch of analytic activities to the server, currently only support viewing post/story and story link clicked activities. \n - For viewing post/story activity, the `impression` and `reach` of the post/story will be updated list of users from `/api/v1/analytics/views/posts/{postId}/users` will be updated too. (but not immediately)", "tags": [ "Analytic" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "activities": { "type": "array", "minItems": 1, "maxItems": 1000, "items": { "type": "object", "properties": { "contentId": { "type": "string", "pattern": "^[a-f\\d]{24}$", "example": "60e4b1b4b3b2b5c4c4b3b2b5" }, "contentType": { "type": "string", "enum": [ "post", "story" ] }, "activityType": { "type": "string", "enum": [ "view", "linkClicked" ] }, "timestamp": { "type": "string", "format": "date-time", "example": "2017-07-21T17:32:28Z" } } } } } } } } }, "responses": { "202": { "description": "ok, not returning any data" }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/analytics/views/posts/{postId}/users": { "get": { "summary": "query post reach", "description": "Query a list of users who have viewed certain post, the user who have been global banned, community banned, or soft deleted will be excluded from the list of users. And if the post is soft deleted, post owner will be able to view this list, but others can not.", "tags": [ "Analytic" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-f\\d]{24}$", "example": "60e4b1b4b3b2b5c4c4b3b2b5" } }, { "name": "token", "in": "query", "schema": { "type": "string", "maxLength": 1000, "example": "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==", "description": "token of the page that you need from either `next` or `prev` of `paging`" } }, { "name": "limit", "in": "query", "schema": { "type": "number", "default": 10, "description": "number of user in a page" } } ], "responses": { "200": { "description": "List of users who have viewed this posts", "content": { "application/json": { "schema": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string", "example": "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==" }, "previous": { "type": "string", "example": "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==" } } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/analytics/views/stories/{storyId}/users": { "get": { "summary": "query story reach", "description": "Query a list of users who have viewed certain story, the user who have been global banned, community banned, or soft deleted will be excluded from the list of users. And if the post is soft deleted, post owner will be able to view this list, but others can not.", "tags": [ "Analytic" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-f\\d]{24}$", "example": "60e4b1b4b3b2b5c4c4b3b2b5" } }, { "name": "token", "in": "query", "schema": { "type": "string", "maxLength": 1000, "example": "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==", "description": "token of the page that you need from either `next` or `prev` of `paging`" } }, { "name": "limit", "in": "query", "schema": { "type": "number", "default": 10, "description": "number of user in a page" } } ], "responses": { "200": { "description": "List of users who have viewed this story", "content": { "application/json": { "schema": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string", "example": "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==" }, "previous": { "type": "string", "example": "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==" } } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/authentication/token": { "get": { "summary": "Get authentication token", "deprecated": true, "tags": [ "Authentication" ], "security": [], "parameters": [ { "name": "x-server-key", "description": "Server key to authenticate the request", "in": "header", "required": true, "schema": { "type": "string", "maxLength": 150 } }, { "name": "userId", "description": "User ID to get token for", "in": "query", "schema": { "type": "string", "maxLength": 100 } } ], "responses": { "200": { "description": "Return authentication token string", "content": { "application/json": { "schema": { "type": "string", "example": "s9qne0wEqVb2e05271177748659f574a4e8ab85e08" } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Put a wrong request parameters.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters error.", "data": { "detail": [ "The 'data.text' field length must be less than or equal to 20000 characters long." ] } } } } } } } }, "/api/v4/authentication/token": { "post": { "summary": "Create authentication token for session creation API", "tags": [ "Authentication" ], "security": [], "parameters": [ { "name": "x-server-key", "description": "Server key to authenticate the request", "in": "header", "required": true, "schema": { "type": "string", "maxLength": 150 } } ], "description": "Create authentication token for session creation API. Token userId need to match userId when using it\n", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id to assign this token" } } } } } }, "responses": { "200": { "description": "Response payload", "content": { "text/plain": { "schema": { "type": "string", "example": "s9qne0wEqVb2e05271177748659f574a4e8ab85e08", "description": "Use this token when create sessions" } } } }, "401": { "description": "Unauthorized. Server key is invalid.", "content": { "text/plain": { "schema": { "type": "string", "example": "Unauthorized", "description": "Server key is invalid" } } } }, "403": { "description": "Forbidden. Possibly that secure mode is disabled", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "number" }, "data": { "type": "object", "description": "error detail" } } } } } }, "422": { "description": "Parameters validation error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "number" }, "data": { "type": "object", "description": "error detail" } } } } } } } } }, "/api/v2/channels/{channelId}/close": { "post": { "summary": "close channel", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "description": "Close channel\n", "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v2/channel/{channelId}/mute": { "put": { "summary": "Mute channel", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "description": "Mute all users in channel for a specific period of time.\n", "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Information of channel to be muted and period\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "mutePeriod": { "type": "number", "description": "mute period (milliseconds)" } }, "required": [ "mutePeriod" ] } } } }, "responses": { "200": { "description": "Mute/unmute information", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } }, "example": { "success": true } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v2/channel/{channelId}/users/mute": { "put": { "summary": "Mute user in channel", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "description": "Mute a user in channel for a specific period of time.\n", "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Information of channel to be muted and period\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userIds": { "type": "array", "items": { "type": "string", "maxLength": 50 }, "maxItems": 100 }, "mutePeriod": { "type": "number", "description": "mute period (milliseconds)" } }, "required": [ "userIds", "mutePeriod" ] } } } }, "responses": { "200": { "description": "Mute/unmute information", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } }, "example": { "success": true } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v2/search/channels": { "get": { "tags": [ "Channel" ], "summary": "Search channels", "description": "Retrieve channels based on search criteria", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "query", "in": "query", "required": true, "description": "Keyword for searching", "schema": { "type": "string" } }, { "name": "exactMatch", "in": "query", "required": false, "description": "Flag to indicate exact match.", "schema": { "type": "boolean", "default": false } }, { "name": "isMemberOnly", "in": "query", "required": false, "description": "Flag to filter only member-only channels.", "schema": { "type": "boolean", "default": false } }, { "name": "types", "in": "query", "required": false, "description": "Array of channel types.", "schema": { "type": "array", "items": { "type": "string", "enum": [ "community", "conversation", "live", "broadcast" ] } } }, { "name": "tags", "in": "query", "required": false, "description": "Array of channel tags.", "schema": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 100 } } }, { "name": "options", "in": "query", "required": false, "description": "Additional search options.", "schema": { "type": "object", "properties": { "limit": { "type": "number", "minimum": 1, "maximum": 100, "default": 20 }, "orderBy": { "type": "string", "default": "desc", "enum": [ "desc", "asc" ] }, "sortBy": { "type": "string", "enum": [ "lastActivity", "relevance" ], "default": "relevance" }, "token": { "type": "string", "maxLength": 100 } } } } ], "responses": { "200": { "description": "Search channel response", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "totalCount": { "type": "number" }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } }, "search": { "type": "object", "properties": { "query": { "type": "string", "description": "The search query." }, "limit": { "type": "integer", "description": "Limit on the number of results." }, "sortBy": { "type": "string", "description": "Sorting criteria (e.g., \"relevance\")." }, "orderBy": { "type": "string", "description": "Sorting order (e.g., \"desc\")." } } } } } } } } } }, "422": { "description": "Parameters validation error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error" } } } } } } }, "/api/v2/search/messages": { "get": { "tags": [ "Message" ], "summary": "Search messages", "description": "Retrieve messages based on search criteria", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "query", "in": "query", "required": true, "description": "Keyword for searching", "schema": { "type": "string", "minLength": 1, "maxLength": 1024 } }, { "name": "exactMatch", "in": "query", "required": false, "description": "Flag to indicate exact match", "schema": { "type": "boolean", "default": false } }, { "name": "channelId", "in": "query", "required": false, "description": "Channel ID to scope the search", "schema": { "type": "string" } }, { "name": "messageFeedId", "in": "query", "required": false, "description": "Message Feed ID to scope the search", "schema": { "type": "string" } }, { "name": "userIds", "in": "query", "required": false, "description": "Array of user public IDs to filter creators", "schema": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "maxItems": 10 } }, { "name": "types", "in": "query", "required": false, "description": "Array of message types to include", "schema": { "type": "array", "uniqueItems": true, "default": [ "text" ], "items": { "type": "string", "enum": [ "text", "image", "video", "audio", "file" ] }, "maxItems": 10 } }, { "name": "tags", "in": "query", "required": false, "description": "Array of tags to include", "schema": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 30 }, "maxItems": 10 } }, { "name": "options", "in": "query", "required": false, "description": "Additional search options", "schema": { "type": "object", "properties": { "limit": { "type": "number", "minimum": 1, "maximum": 100, "default": 20 }, "orderBy": { "type": "string", "enum": [ "desc", "asc" ], "default": "desc" }, "sortBy": { "type": "string", "enum": [ "createdAt", "relevance" ], "default": "createdAt" }, "token": { "type": "string", "maxLength": 100 } } } } ], "responses": { "200": { "description": "Search messages response", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ] }, "data": { "type": "object", "description": "Body of a message." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "fileId": { "type": "string", "description": "file key on cloud storage." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } } } }, "messageFeeds": { "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "totalCount": { "type": "number" }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } }, "search": { "type": "object", "properties": { "query": { "type": "string", "description": "The search query." }, "limit": { "type": "integer", "description": "Limit on the number of results." }, "sortBy": { "type": "string", "description": "Sorting criteria (e.g., \"relevance\" or \"createdAt\")." }, "orderBy": { "type": "string", "description": "Sorting order (e.g., \"desc\")." } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Parameters validation error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error" } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/channels": { "get": { "summary": "Query channel", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "keyword", "in": "query", "schema": { "type": "string", "maxLength": 100 } }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "isDeleted:\n * `null(default)` - Show both channel is actived and channel is inactived.\n * `true` - Show channel is inactived only.\n * `false` - Show channel is actived only.\n" }, { "name": "tags", "in": "query", "schema": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 100 } }, "description": "Used for querying channels by matching all specified tags. When a query includes multiple tags (e.g., `tags=['tag1', 'tag2', 'tag3']`), the system will return all channels that have all the specified tags." }, { "name": "excludeTags", "in": "query", "schema": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 100 } }, "description": "Used for querying channels by excluding all specified tags. When a query includes multiple tags (e.g., `excludeTags=['tag1', 'tag2', 'tag3']`), the system will return all channels that do not have any of the specified tags." }, { "name": "excludeArchives", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "excludeArchives:\n * `false(default)` - Show all channels.\n * `true` - Show channels that are not archived only.\n" }, { "name": "filter", "in": "query", "schema": { "type": "string", "enum": [ "all", "member", "notMember", "flagged" ], "default": "all" } }, { "name": "types", "in": "query", "schema": { "type": "array", "maxItems": 10, "items": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "live", "community" ] } } }, { "name": "userId", "in": "query", "schema": { "type": "string", "maxLength": 100 } }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "lastActivity", "lastCreated", "firstCreated", "displayName" ], "default": "lastActivity" } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 }, "token": { "type": "string", "maxLength": 100 } } } } ], "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } } } } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "Create channel", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "Information of channel to be created\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "channelId": { "type": "string", "maxLength": 100, "description": "A unique identifier for the channel. Maximum length is 100 characters." }, "type": { "type": "string", "enum": [ "community", "live", "broadcast" ], "default": "community", "description": "Type of the channel. Options are 'community', 'live', or 'broadcast'. Default is 'community'." }, "displayName": { "type": "string", "maxLength": 100, "description": "The display name for the channel. Maximum length is 100 characters." }, "avatarFileId": { "type": "string", "maxLength": 50, "description": "The ID of the file to be used as the channel's avatar. Maximum length is 50 characters." }, "metadata": { "type": "object", "description": "Additional metadata associated with the channel. Can include custom properties." }, "tags": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 100 }, "description": "List of tags associated with the channel. Maximum of 10 tags, each up to 100 characters long." }, "userIds": { "type": "array", "maxItems": 1000, "items": { "type": "string", "maxLength": 50 }, "description": "List of user IDs to be added to the channel. Maximum of 1000 user IDs, each up to 50 characters long." }, "isMuted": { "type": "boolean", "description": "Indicates whether the channel is muted by default for all users." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Indicates whether automatic deletion of messages is enabled for the channel." }, "autoDeleteMessageByFlagLimit": { "type": "number", "minimum": 1, "maximum": 1000, "description": "The number of flags required to automatically delete a message. Must be between 1 and 1000." }, "isPublic": { "type": "boolean", "description": "Indicates whether the channel is public and visible to all users." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "The notification mode for the channel:\n * `default` - Automatically register push notifications.\n * `silent` - Do not send notifications.\n * `subscribe` - Send notifications only to subscribed users.\n" }, "videoStreamId": { "type": "string", "description": "The ID of the parent live video stream (must be a parent stream, not a child stream). This is required when `postId` is provided. When provided, the channel will be associated with this live stream so that users can perform live chat and live reaction." }, "postId": { "type": "string", "description": "The ID of the post that `videoStreamId` or `roomId` belongs to. This required when `videoStreamId` is provided." }, "roomId": { "type": "string", "description": "The ID of the parent live room (must be a parent room, not a child room). This is required when `postId` is provided. When provided, the channel will be associated with this live room so that users can perform live chat and live reaction." } } } } } }, "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "List of users in channel with membership and role. Normally, it will return only caller as user. However, it will return all users in conversation channel. For ban/unban events, it will return banned users.", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "ForbiddenAvatarError": { "summary": "Put file type not image into avatar", "value": { "status": "error", "code": 400300, "message": "Avatar must be an image." } }, "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/channels/seen": { "post": { "summary": "Bulk mark seen", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "Information of read sengment to be updated\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "channelId": { "type": "string", "maxLength": 128, "description": "The unique identifier for the channel. This public ID is used to identify the specific channel for which the readToSegment value is being updated.\n" }, "readToSegment": { "type": "number", "minimum": 1, "description": "The readToSegment value indicates the last segment that has been read by the user in that channel. This is used to track the user's progress in reading messages within the channel.\n" } }, "required": [ "channelId", "readToSegment" ] }, "description": "List of channels with their respective readToSegment values. Each channel object must include a channelId and the readToSegment value.\n", "example": [ { "channelId": "67cfbbe1c5dbdcb2909935e5", "readToSegment": 4 }, { "channelId": "67cfbbd7c5dbdcb2909935d0", "readToSegment": 10 }, { "channelId": "67cfbbd7c5dbdcb2909935d1", "readToSegment": 10 } ] } } } } } }, "responses": { "200": { "description": "This endpoint returns 200 OK if the request is successful." }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/channels/{channelId}": { "get": { "summary": "get a channel by ID.", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "List of users in channel with membership and role. Normally, it will return only caller as user. However, it will return all users in conversation channel. For ban/unban events, it will return banned users.", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "update a channel", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Information of channel to be updated\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "displayName": { "type": "string", "maxLength": 100 }, "avatarFileId": { "type": "string", "maxLength": 50 }, "metadata": { "type": "object" }, "tags": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 100 } }, "messageAutoDeleteEnabled": { "type": "boolean" }, "autoDeleteMessageByFlagLimit": { "type": "number", "minimum": 1, "maximum": 1000 }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" } } } } } }, "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "List of users in channel with membership and role. Normally, it will return only caller as user. However, it will return all users in conversation channel. For ban/unban events, it will return banned users.", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "ForbiddenAvatarError": { "summary": "Put file type not image into avatar", "value": { "status": "error", "code": 400300, "message": "Avatar must be an image." } }, "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "delete a channel", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/channels/{channelId}/join": { "post": { "summary": "join a channel", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "List of users in channel with membership and role. Normally, it will return only caller as user. However, it will return all users in conversation channel. For ban/unban events, it will return banned users.", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "ForbiddenError": { "summary": "No permission to access this resource.", "value": { "status": "error", "code": 400300, "message": "Forbidden error." } }, "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/channels/{channelId}/leave": { "delete": { "summary": "leave a channel", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "List of users in channel with membership and role. Normally, it will return only caller as user. However, it will return all users in conversation channel. For ban/unban events, it will return banned users.", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } }, "ForbiddenError": { "summary": "No permission to access this resource.", "value": { "status": "error", "code": 400300, "message": "Forbidden error." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/channels/{channelId}/seen": { "post": { "summary": "Mark user message read position inside channel", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "description": "Mark user message read position inside channel\n", "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Segment of the message\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "readToSegment": { "type": "number" } }, "required": [ "readToSegment" ] } } } }, "responses": { "200": { "description": "OK" }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/channels/{channelId}/users": { "get": { "summary": "query channel users", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "roles", "in": "query", "schema": { "type": "array", "minItems": 1, "maxItems": 20, "items": { "type": "string", "minLength": 1, "maxLength": 900 } }, "description": "Role to filter" }, { "name": "filter", "in": "query", "schema": { "type": "string", "enum": [ "all", "muted", "banned", "member&banned" ], "default": "all" } }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "lastCreated", "firstCreated", "displayName" ], "default": "lastCreated" } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 }, "token": { "type": "string", "maxLength": 100 } } } }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "filter deleted members if isDeleted is null, will return both deleted and non-deleted members" } ], "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "add channel users", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Information of channel\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userIds": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 50 } } }, "required": [ "userIds" ] } } } }, "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "List of users in channel with membership and role. Normally, it will return only caller as user. However, it will return all users in conversation channel. For ban/unban events, it will return banned users.", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "ForbiddenError": { "summary": "No permission to access this resource.", "value": { "status": "error", "code": 400300, "message": "Forbidden error." } }, "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "remove channel users", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "userIds", "schema": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 50 } }, "description": "list of user id" } ], "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "List of users in channel with membership and role. Normally, it will return only caller as user. However, it will return all users in conversation channel. For ban/unban events, it will return banned users.", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "ForbiddenError": { "summary": "No permission to access this resource.", "value": { "status": "error", "code": 400300, "message": "Forbidden error." } }, "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/channels/{channelId}/users/ban": { "put": { "summary": "ban channel users", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Information of channel\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userIds": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 50 } } }, "required": [ "userIds" ] } } } }, "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "List of users in channel with membership and role. Normally, it will return only caller as user. However, it will return all users in conversation channel. For ban/unban events, it will return banned users.", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "ForbiddenError": { "summary": "No permission to access this resource.", "value": { "status": "error", "code": 400300, "message": "Forbidden error." } }, "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/channels/{channelId}/users/unban": { "put": { "summary": "unban channel users", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Information of channel\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userIds": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 50 } } }, "required": [ "userIds" ] } } } }, "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "List of users in channel with membership and role. Normally, it will return only caller as user. However, it will return all users in conversation channel. For ban/unban events, it will return banned users.", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "ForbiddenError": { "summary": "No permission to access this resource.", "value": { "status": "error", "code": 400300, "message": "Forbidden error." } }, "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/channels/{channelId}/users/roles": { "post": { "summary": "Add role to channel users", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "role": { "type": "string", "minLength": 1, "maxLength": 100 }, "userIds": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 50 } } }, "required": [ "userIds", "role" ] } } } }, "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "List of users in channel with membership and role. Normally, it will return only caller as user. However, it will return all users in conversation channel. For ban/unban events, it will return banned users.", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "GenericPermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "Permission denied" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Remove role from channel users", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "userIds", "schema": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 50 } }, "description": "list of user id" }, { "in": "query", "name": "role", "schema": { "type": "string", "minLength": 1, "maxLength": 900 }, "description": "User id for revocation" } ], "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "List of users in channel with membership and role. Normally, it will return only caller as user. However, it will return all users in conversation channel. For ban/unban events, it will return banned users.", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "GenericPermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "Permission denied" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/channels/conversation": { "post": { "summary": "create a conversation channel", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "Information of conversation channel to be created\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userIds": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 50 } }, "isDistinct": { "type": "boolean", "default": true }, "displayName": { "type": "string", "maxLength": 100 }, "avatarFileId": { "type": "string", "maxLength": 50 }, "metadata": { "type": "object" }, "tags": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 100 } } }, "required": [ "userIds" ] } } } }, "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "List of users in channel with membership and role. Normally, it will return only caller as user. However, it will return all users in conversation channel. For ban/unban events, it will return banned users.", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "ForbiddenAvatarError": { "summary": "Put file type not image into avatar", "value": { "status": "error", "code": 400300, "message": "Avatar must be an image." } }, "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/channels/list": { "get": { "summary": "get list of channel", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "description": "Get list of channel\n", "parameters": [ { "name": "channelIds", "in": "query", "required": true, "schema": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 50 } } } ], "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "List of users in channel with membership and role. Normally, it will return only caller as user. However, it will return all users in conversation channel. For ban/unban events, it will return banned users.", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "messagePreviews": { "type": "array", "description": "Depends on messagePreviewId. if null will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviewId. if null will be empty array.", "properties": { "messageId": { "description": "Message id of message preview", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "messageFeedsInfo": { "type": "array", "description": "Depends on messagePreviews. if empty array will be empty array.", "items": { "type": "object", "description": "Depends on messagePreviews. if empty array will be empty array.", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/channels/{channelId}/users": { "get": { "summary": "Query Channel Users", "description": "Retrieves a paginated list of users associated with a specific channel.
\nSupports filtering by membership status, roles, and search criteria.
\nResults can be sorted using various options and searched by different user attributes.
\n", "tags": [ "Channel" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "in": "path", "required": true, "description": "Channel ID to query users from", "schema": { "type": "string", "minLength": 1, "maxLength": 900 } }, { "name": "role", "in": "query", "schema": { "type": "array", "description": "Role to filter", "minItems": 1, "maxItems": 20, "items": { "type": "string", "minLength": 1, "maxLength": 900 } } }, { "name": "sortBy", "in": "query", "description": "Sort channel users by createdAt or updatedAt, default is lastCreated\n", "schema": { "type": "string", "enum": [ "lastCreated", "firstCreated" ], "default": "lastCreated" } }, { "name": "memberships", "in": "query", "schema": { "type": "array", "description": "Member type to filter - member type: User is member of channel - banned type: User is banned member of channel - muted type: User is member of channel but isMuted is true\n", "minItems": 1, "maxItems": 3, "items": { "type": "string", "enum": [ "muted", "banned", "member" ] }, "default": [ "member" ] } }, { "name": "options[limit]", "in": "query", "description": "Number of results per page (1-100)", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 } }, { "name": "options[token]", "in": "query", "description": "Pagination token for getting next/previous pages", "schema": { "type": "string", "maxLength": 1000 } }, { "name": "search", "in": "query", "description": "Keyword to search for in user information such as displayName, profileHandle, and userId. The search is case-insensitive and supports partial matches.", "schema": { "type": "string", "minLength": 0, "maxLength": 10000 } }, { "name": "searchBy", "in": "query", "schema": { "type": "array", "maxItems": 3, "items": { "type": "string", "enum": [ "displayName", "profileHandle", "userId" ], "default": [ "displayName", "profileHandle", "userId" ] } }, "examples": { "singleField": { "summary": "Search by display name", "value": [ "displayName" ] }, "multipleFields": { "summary": "Search by userId and profileHandle", "value": [ "userId", "profileHandle" ] } }, "description": "Fields to search channel users for the keyword **(up to 3 fields can be specified)**
\n`displayName` - search by display name
\n`profileHandle` - search by profile handle
\n`userId` - search by user id
\nDefault is all three fields\n" }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "filter deleted members if isDeleted is null, will return both deleted and non-deleted members" } ], "responses": { "200": { "description": "Channels Information", "content": { "application/json": { "schema": { "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/comments": { "get": { "summary": "query comments", "tags": [ "Comment" ], "security": [ { "ApiKeyAuth": [] } ], "description": "query comments (pagination support).\n* `scrollable` - 'after', 'first', 'before' and 'last' will be set for page size with direction.\n* `pagination` - 'skip' and 'limit' will be the number of records to skip and max records size.\n\n(default: scrollable)\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "referenceId", "in": "query", "schema": { "type": "string", "maxLength": 900 }, "description": "ID of the reference **(post, content, or story)**" }, { "name": "referenceType", "in": "query", "schema": { "type": "string", "enum": [ "post", "content", "story" ] }, "description": "Type of the reference **(post, content, or story)**" }, { "name": "filterByParentId", "in": "query", "schema": { "type": "boolean", "default": true }, "description": "Whether to filter by parent ID **(defaults to true)**" }, { "name": "parentId", "in": "query", "schema": { "type": "string", "maxLength": 900 }, "description": "ID of the parent comment **(when filterByParentId is true)**" }, { "name": "hasFlag", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "Filter by flagged comments" }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "Filter by deleted status" }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "lastCreated", "firstCreated", "lastUpdated", "firstUpdated" ] }, "description": "Sort order for comments **(only for pagination type)**" }, { "name": "options", "in": "query", "required": false, "schema": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "scrollable", "pagination" ], "default": "scrollable", "example": "options[type]=pagination", "description": "Type of pagination. **(default: scrollable)**\n* `scrollable(default)` - 'after', 'first', 'before' and 'last' will be set for page size with direction.\n* `pagination` - 'skip' and 'limit' will be the number of records to skip and max records size.\n" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100, "example": "options[limit]=10", "description": "Page size **(for pagination type)**" }, "skip": { "type": "integer", "minimum": 0, "maximum": 100, "example": "options[skip]=0", "description": "Number of records to skip **(for pagination type)**" }, "after": { "type": "integer", "minimum": 1, "example": "options[after]=1", "description": "Cursor value to get records after **(for scrollable type)**" }, "first": { "type": "integer", "minimum": 1, "maximum": 100, "example": "options[first]=10", "description": "Number of records to fetch after cursor **(for scrollable type)**" }, "before": { "type": "integer", "minimum": 1, "example": "options[before]=1", "description": "Cursor value to get records before **(for scrollable type)**" }, "last": { "type": "integer", "minimum": 1, "maximum": 100, "example": "options[last]=10", "description": "Number of records to fetch before cursor **(for scrollable type)**" }, "token": { "type": "string", "maxLength": 1000, "example": "options[token]=eyJza2lwIjoyMCwibGlABDFRffewfQ==", "description": "Pagination token" } } } }, { "name": "dataTypes", "in": "query", "schema": { "type": "object", "properties": { "values": { "type": "array", "items": { "type": "string", "enum": [ "text", "image" ] }, "example": "dataTypes[values][]=text", "description": "The dataTypes values want to be contained in the comment (available values: `text`, `image`)\n" }, "matchType": { "type": "string", "enum": [ "any", "exact" ], "example": "dataTypes[matchType]=any", "description": "How the dataTypes must be contained in the comment.\n* `any`: the dataTypes could match only partial of the provided field\n* `exact`: the dataTypes must contain exactly the same as provided in values\n" } } } } ], "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "create a comment.", "tags": [ "Comment" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "information of a comment to be created.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "referenceId": { "type": "string", "maxLength": 900 }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "default": "post" }, "data": { "type": "object", "properties": { "text": { "type": "string", "maxLength": 50000 } } }, "metadata": { "type": "object" }, "links": { "type": "array", "maxItems": 100, "description": "Array of URL links extracted from content with metadata for link preview rendering", "items": { "type": "object", "required": [ "url" ], "properties": { "index": { "type": "number", "minimum": 0, "description": "Starting position of the URL in the original text content" }, "length": { "type": "number", "minimum": 1, "description": "Length of the URL string in the original text content" }, "url": { "type": "string", "maximum": 2000, "description": "The complete URL found in the content" }, "renderPreview": { "type": "boolean", "default": false, "description": "Flag indicating whether to render a rich preview for this link" }, "domain": { "type": "string", "maximum": 2000, "description": "Domain name extracted from the URL (e.g., 'example.com')" }, "title": { "type": "string", "maximum": 2000, "description": "Title of the linked page, typically extracted from Open Graph or meta tags" }, "imageUrl": { "type": "string", "maximum": 2000, "description": "URL of the preview image for the link, typically extracted from Open Graph tags" } } } }, "commentId": { "type": "string", "maxLength": 900 }, "parentId": { "type": "string", "maxLength": 900 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "example": "user", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "example": [ "userId1", "userId2" ], "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } } } } }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time", "example": "2022-07-07T04:24:20.444Z" }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "referenceId" ] } } } }, "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/comments/{commentId}": { "get": { "summary": "get a comment.", "tags": [ "Comment" ], "security": [ { "BearerAuth": [] } ], "description": "get a comment.\n", "parameters": [ { "name": "commentId", "in": "path", "required": true, "description": "Get comment by ID.", "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "update a comment.", "tags": [ "Comment" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "commentId", "in": "path", "required": true, "description": "Get comment by ID.", "schema": { "type": "string" } }, { "name": "preserve-edited-at", "in": "header", "required": false, "description": "Preserve the `editedAt` value when updating a comment.\nIf the value is `true`, the `editedAt` value will not be updated.\nIf the value is `false`, the `editedAt` value will be updated.\n", "schema": { "type": "boolean", "default": false } } ], "requestBody": { "description": "comment information.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "text": { "type": "string", "maxLength": 50000 } } }, "metadata": { "type": "object" }, "links": { "type": "array", "maxItems": 100, "description": "Array of URL links extracted from content with metadata for link preview rendering", "items": { "type": "object", "required": [ "url" ], "properties": { "index": { "type": "number", "minimum": 0, "description": "Starting position of the URL in the original text content" }, "length": { "type": "number", "minimum": 1, "description": "Length of the URL string in the original text content" }, "url": { "type": "string", "maximum": 2000, "description": "The complete URL found in the content" }, "renderPreview": { "type": "boolean", "default": false, "description": "Flag indicating whether to render a rich preview for this link" }, "domain": { "type": "string", "maximum": 2000, "description": "Domain name extracted from the URL (e.g., 'example.com')" }, "title": { "type": "string", "maximum": 2000, "description": "Title of the linked page, typically extracted from Open Graph or meta tags" }, "imageUrl": { "type": "string", "maximum": 2000, "description": "URL of the preview image for the link, typically extracted from Open Graph tags" } } } }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "example": "user", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "example": [ "userId1", "userId2" ], "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "reason": { "type": "string", "maxLength": 300, "description": "Optional reason for the edit (admin only, ignored for regular users)" } } } } } }, "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "delete a comment.", "deprecated": true, "tags": [ "Comment" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "commentId", "in": "path", "required": true, "description": "Get comment by ID.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "comment information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/comments/{commentId}/flag": { "post": { "summary": "flag a comment.", "tags": [ "Comment" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "commentId", "in": "path", "required": true, "description": "Get comment by ID.", "schema": { "type": "string" } } ], "requestBody": { "description": "information of a comment to be flagged.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "commentId": { "type": "string", "maxLength": 900 }, "reason": { "type": "string", "maxLength": 300, "default": "Others", "description": "The reason for flagging this comment" }, "detail": { "type": "string", "maxLength": 300, "description": "Additional details about the flag" } }, "required": [ "commentId" ] } } } }, "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error when too many user is already flagged message.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Number of flag already exceed." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/comments/{commentId}/isflagbyme": { "get": { "summary": "Check whether user flag a given comment.", "tags": [ "Comment" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "commentId", "in": "path", "required": true, "description": "Get comment by ID.", "schema": { "type": "string" } } ], "description": "Check whether user flag a given comment.\n", "responses": { "200": { "description": "Is flag by me response.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "result": { "type": "boolean" } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } } } } }, "/api/v3/comments/{commentId}/unflag": { "delete": { "summary": "unflag a comment.", "tags": [ "Comment" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "commentId", "in": "path", "required": true, "description": "Get comment by ID.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/comments/list": { "get": { "summary": "get comments by IDs.", "tags": [ "Comment" ], "security": [ { "BearerAuth": [] } ], "description": "get comments by IDs.\n", "parameters": [ { "name": "commentIds", "in": "query", "required": true, "schema": { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "string", "maxLength": 50 } } } ], "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/comments/{commentId}/flags": { "delete": { "summary": "clear flags.", "tags": [ "Comment" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "commentId", "in": "path", "required": true, "description": "Get comment by ID.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/comments/{commentId}": { "delete": { "summary": "delete a comment.", "tags": [ "Comment" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "commentId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "permanent", "in": "query", "schema": { "type": "boolean", "description": "If permanent data will be hard deleted" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/communities": { "get": { "summary": "query communities.", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "query communities.\n", "parameters": [ { "name": "keyword", "in": "query", "schema": { "type": "string", "minLength": 0, "maxLength": 100 } }, { "name": "tags", "in": "query", "schema": { "type": "array", "maxItems": 10, "items": { "type": "string", "minLength": 1, "maxLength": 1000 } }, "description": "Used for querying communities by matching all specified tags. When a query includes multiple tags (e.g., `tags=['tag1', 'tag2', 'tag3']`), the system will return all communities that have all the specified tags." }, { "name": "filter", "in": "query", "schema": { "type": "string", "enum": [ "all", "member", "notMember" ], "default": "all" }, "description": "" }, { "name": "categoryId", "in": "query", "schema": { "type": "string", "minLength": 50, "maxLength": 50 } }, { "name": "sortBy", "in": "query", "description": "The default value depends on the 'search' parameter.\n * If 'search' parameter is not set, the default value is 'lastCreated'.\n * If 'search' parameter is set, the default value is 'displayName'.\n", "schema": { "type": "string", "enum": [ "firstCreated", "lastCreated", "displayName" ], "default": "lastCreated" } }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "isDeleted:\n * `null(default)` - Show both community is actived and community is inactived.\n * `true` - Show community is inactived only.\n * `false` - Show community is actived only.\n" }, { "name": "hasFlag", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "hasFlag:\n * `null(default)` - Show all communities.\n * `true` - Show only community has flagged post(or children post) or has flagged comment.\n * `false` - Show only community has no flagged post(and children post) and has no flagged comment.\n" }, { "name": "includeDiscoverablePrivateCommunity", "in": "query", "description": "If true, include discoverable private communities in the response. Default is false.", "schema": { "type": "boolean" } }, { "name": "options[limit]", "in": "query", "description": "Number of results per page (1-100)", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 } }, { "name": "options[token]", "in": "query", "description": "Pagination token for getting next/previous pages", "schema": { "type": "string", "maxLength": 1000 } } ], "responses": { "200": { "description": "Community Users Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "create a community.", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "information of a community to be created.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "displayName": { "type": "string", "minLength": 1, "maxLength": 1000 }, "isPublic": { "type": "boolean", "default": true }, "isOfficial": { "type": "boolean", "default": false }, "onlyAdminCanPost": { "type": "boolean", "default": false }, "description": { "type": "string", "minLength": 1, "maxLength": 5000 }, "tags": { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "string", "minLength": 1, "maxLength": 100 } }, "metadata": { "type": "object" }, "avatarFileId": { "type": "string", "maxLength": 50, "minLength": 1 }, "userIds": { "type": "array", "minItems": 1, "maxItems": 1000, "items": { "type": "string", "minLength": 1, "maxLength": 900 } }, "categoryIds": { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "string", "minLength": 1, "maxLength": 50 } }, "isUniqueDisplayName": { "type": "boolean", "default": false }, "needApprovalOnPostCreation": { "type": "boolean", "default": false }, "allowCommentInStory": { "type": "boolean", "default": true }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" } }, "required": [ "displayName" ] } } } }, "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "ForbiddenError": { "summary": "No permission to access this resource.", "value": { "status": "error", "code": 400300, "message": "Forbidden error." } }, "DuplicateEntryError": { "summary": "Data already exists", "value": { "status": "error", "code": 400315, "message": "Data already exists" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/communities/{communityId}": { "get": { "summary": "get a community by ID.", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "Get a community by ID\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } }, { "name": "type", "in": "query", "schema": { "type": "string", "enum": [ "public", "internal" ], "default": "public" }, "description": "type of communityId" } ], "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "update a community.", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "requestBody": { "description": "community information.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "communityId": { "type": "string", "minLength": 1, "maxLength": 900 }, "displayName": { "type": "string", "minLength": 1, "maxLength": 1000 }, "isPublic": { "type": "boolean" }, "isOfficial": { "type": "boolean" }, "onlyAdminCanPost": { "type": "boolean" }, "description": { "type": "string", "minLength": 0, "maxLength": 5000 }, "tags": { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "string", "minLength": 1, "maxLength": 100 } }, "metadata": { "type": "object" }, "avatarFileId": { "type": "string", "maxLength": 50, "minLength": 1 }, "categoryIds": { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "string", "minLength": 1, "maxLength": 50 } }, "isUniqueDisplayName": { "type": "boolean", "default": false }, "needApprovalOnPostCreation": { "type": "boolean", "default": false }, "allowCommentInStory": { "type": "boolean", "default": true }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" } }, "required": [ "communityId" ] } } } }, "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "ForbiddenError": { "summary": "No permission to access this resource.", "value": { "status": "error", "code": 400300, "message": "Forbidden error." } }, "DuplicateEntryError": { "summary": "Data already exists", "value": { "status": "error", "code": 400315, "message": "Data already exists" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "delete a community.", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "responses": { "200": { "description": "delete information", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } }, "example": { "success": true } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/communities/{communityId}/join": { "post": { "summary": "Join a community", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "deprecated": true, "description": "This API will make the requesting user to become a member of a community.\n\n**⚠️ DEPRECATED NOTICE**\n\nThis API is deprecated and only supports UIKit v3. If you're using UIKit v4 or later versions, please migrate to the updated join community API:\n\n- **New API**: `POST /api/v4/communities/{communityId}/join`\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "403": { "description": "User is banned from a channel / community.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/communities/{communityId}/leave": { "delete": { "summary": "Leave a community.", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "Leave community by ID\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400100, "message": "Unauthorized" } } } }, "403": { "description": "User is banned from a channel / community.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/communities/{communityId}/users": { "get": { "summary": "Query Community Users", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "Retrieves a paginated list of users associated with a specific community.
\nSupports filtering by membership status, roles, and search criteria.
\nResults can be sorted using various options and searched by different user attributes.
\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } }, { "name": "memberships", "in": "query", "schema": { "type": "array", "description": "Membership type to filter (If not filter will return both banned user and member)", "minItems": 1, "maxItems": 2, "items": { "type": "string", "enum": [ "banned", "member" ] } } }, { "name": "roles", "in": "query", "description": "Filter users by their community roles", "schema": { "type": "array", "minItems": 1, "maxItems": 20, "items": { "type": "string", "minLength": 1, "maxLength": 100 } } }, { "name": "sortBy", "in": "query", "description": "The default value depends on the `search` parameter.
\n * If `search` parameter is not set, the default value is `lastCreated`.\n * If `search` parameter is set, the default value is `displayName`.\n", "schema": { "type": "string", "enum": [ "firstCreated", "lastCreated", "displayName", "profileHandle", "lastJoin", "firstJoin" ], "default": "lastCreated" }, "examples": { "lastCreated": { "summary": "Sort by creation date (newest first)", "value": "lastCreated" }, "displayName": { "summary": "Sort by display name (alphabetical order)", "value": "displayName" } } }, { "name": "options[limit]", "in": "query", "description": "Number of results per page (1-100)", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 } }, { "name": "options[token]", "in": "query", "description": "Pagination token for getting next/previous pages", "schema": { "type": "string", "maxLength": 1000 } }, { "name": "search", "description": "Keyword to search for in user information such as displayName, profileHandle, and userId. The search is case-insensitive and supports partial matches.", "in": "query", "schema": { "type": "string", "maxLength": 10000 } }, { "name": "searchBy", "in": "query", "schema": { "type": "array", "maxItems": 3, "items": { "type": "string", "enum": [ "displayName", "profileHandle", "userId" ], "default": [ "displayName", "profileHandle", "userId" ] } }, "examples": { "singleField": { "summary": "Search by display name", "value": [ "displayName" ] }, "multipleFields": { "summary": "Search by userId and profileHandle", "value": [ "userId", "profileHandle" ] } }, "description": "Fields to search community users for the search keyword **(must be used with a search parameter)**, Default is all three fields
\n * `displayName` - Search by display name. When using with `sortBy` parameter the applicable sort order is `displayName`, `lastCreated` or `firstCreated`. Default to `lastCreated`.
\n * `profileHandle` - Search by profile handle, when using with `sortBy` parameter the applicable sort order is `profileHandle`, `lastCreated` or `firstCreated`. Default to `lastCreated`.
\n * `userId` - Search by user id, when using with `sortBy` parameter the applicable sort order is `lastCreated`, `firstCreated` or `displayName`. Default to `lastCreated`.
\n" }, { "name": "type", "in": "query", "schema": { "type": "string", "enum": [ "public", "internal" ], "default": "public" }, "description": "type of communityId" }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "filter deleted members if isDeleted is null, will return both deleted and non-deleted members" } ], "responses": { "200": { "description": "Community Users Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "add community users", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "deprecated": true, "description": "This API will add multiple users to a community.\n\n**⚠️ DEPRECATED NOTICE**\n\nThis API is deprecated and only supports UIKit v3. If you're using UIKit v4 or later versions, please migrate to the new invitation system:\n\n- **New API**: `POST /api/v1/invitations`\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "requestBody": { "description": "information of a community.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userIds": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 50 } } }, "required": [ "userIds" ] } } } }, "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "remove community users", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "remove community users\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } }, { "in": "query", "name": "userIds", "required": true, "schema": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 50 } }, "description": "list of user id" } ], "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/communities/{communityId}/users/ban": { "put": { "summary": "ban community users", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "ban community users.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "requestBody": { "description": "condition for querying\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userIds": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 900 } } }, "required": [ "userIds" ] } } } }, "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } }, "ExemptFromBanError": { "summary": "Some users cannot be banned", "value": { "status": "error", "code": 400306, "message": "Some users cannot be banned" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/communities/{communityId}/users/unban": { "put": { "summary": "unban community users", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "unban community users.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "requestBody": { "description": "condition for querying\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userIds": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 900 } } }, "required": [ "userIds" ] } } } }, "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } }, "UserIsUnbannedError": { "summary": "User is unbanned from a channel / community.", "value": { "status": "error", "code": 400316, "message": "User is unbanned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/communities/{communityId}/users/roles": { "post": { "summary": "Add role to community users", "tags": [ "Community" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Add role to community users.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "role": { "type": "string", "minLength": 1, "maxLength": 100 }, "userIds": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 50 } } }, "required": [ "userIds", "role" ] } } } }, "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "GenericPermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "Permission denied" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Remove role from community users", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "Remove role from community users.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } }, { "in": "query", "name": "userIds", "required": true, "schema": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 50 } }, "description": "list of user id" }, { "in": "query", "name": "role", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "GenericPermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "Permission denied" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/communities/{communityId}/permissions/me": { "get": { "summary": "Get self permission in community", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "query comments.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "responses": { "200": { "description": "Communities permission information for this user", "content": { "application/json": { "schema": { "type": "object", "properties": { "isCreator": { "type": "boolean", "example": false, "description": "Is this person create this community?" }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/communities/list": { "get": { "summary": "get list of community", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "Get list of community\n", "parameters": [ { "name": "communityIds", "in": "query", "required": true, "schema": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "maxLength": 50 } } }, { "name": "type", "in": "query", "schema": { "type": "string", "enum": [ "public", "internal" ], "default": "public" }, "description": "type of communityId" } ], "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/communities/recommended": { "get": { "summary": "get list of recommended community", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "Get list of recommended community\n", "parameters": [ { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "includeDiscoverablePrivateCommunity", "in": "query", "description": "If true, include discoverable private communities in the response. Default is false.", "schema": { "type": "boolean" } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 5 } } } } ], "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/communities/top-trending": { "get": { "summary": "get list of top trend community", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "Get list of top trend community\n", "parameters": [ { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "includeDiscoverablePrivateCommunity", "in": "query", "description": "If true, include discoverable private communities in the response. Default is false.", "schema": { "type": "boolean" } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 5 } } } } ], "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/communities/{communityId}/users/roles": { "post": { "summary": "Add roles to community users", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "Add roles to community users.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "roles": { "type": "array", "minItems": 1, "maxItems": 20, "items": { "description": "Role id", "type": "string", "minLength": 1, "maxLength": 100 } }, "userIds": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 50 } } }, "required": [ "userIds", "roles" ] } } } }, "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "joinRequests": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a join request." }, "networkId": { "type": "string", "description": "ID of the network." }, "targetId": { "type": "string", "description": "ID of the target entity (community)." }, "targetType": { "type": "string", "description": "Type of the target entity." }, "type": { "type": "string", "description": "Type of the request." }, "userId": { "type": "string", "description": "ID of the user making the request." }, "status": { "type": "string", "description": "Current status of the join request." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "The date/time when the request was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was created." }, "joinRequestId": { "type": "string", "description": "Public ID of the join request." }, "requestorId": { "type": "string", "description": "Public ID of the user who made the request." }, "requestorPublicId": { "type": "string", "description": "Public ID of the requestor." }, "requestorInternalId": { "type": "string", "description": "Internal ID of the requestor." }, "responderId": { "type": "string", "nullable": true, "description": "ID of the user who responded to the request." }, "responderPublicId": { "type": "string", "nullable": true, "description": "Public ID of the responder." }, "responderInternalId": { "type": "string", "nullable": true, "description": "Internal ID of the responder." } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "GenericPermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "Permission denied" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Remove roles from community users", "tags": [ "Community" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Remove roles from community users.\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } }, { "in": "query", "name": "roles", "required": true, "schema": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "description": "Role id", "minLength": 1, "maxLength": 100 } }, "description": "list of role id" }, { "in": "query", "name": "userIds", "required": true, "schema": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 50 } }, "description": "list of user id" } ], "responses": { "200": { "description": "Communities Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "joinRequests": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a join request." }, "networkId": { "type": "string", "description": "ID of the network." }, "targetId": { "type": "string", "description": "ID of the target entity (community)." }, "targetType": { "type": "string", "description": "Type of the target entity." }, "type": { "type": "string", "description": "Type of the request." }, "userId": { "type": "string", "description": "ID of the user making the request." }, "status": { "type": "string", "description": "Current status of the join request." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "The date/time when the request was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was created." }, "joinRequestId": { "type": "string", "description": "Public ID of the join request." }, "requestorId": { "type": "string", "description": "Public ID of the user who made the request." }, "requestorPublicId": { "type": "string", "description": "Public ID of the requestor." }, "requestorInternalId": { "type": "string", "description": "Internal ID of the requestor." }, "responderId": { "type": "string", "nullable": true, "description": "ID of the user who responded to the request." }, "responderPublicId": { "type": "string", "nullable": true, "description": "Public ID of the responder." }, "responderInternalId": { "type": "string", "nullable": true, "description": "Internal ID of the responder." } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "GenericPermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "Permission denied" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/communities/{communityId}/join": { "post": { "summary": "Join a community", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "Creates a community membership request for the requesting user and once approved by moderators, that user will become a member of the community.\n\n**Key Features:**\n- If the community set property `requiresJoinApproval` to `false`, the user will be added to the community immediately with approved request created.\n- If the community set property `requiresJoinApproval` to `true`, the user will have pending request created, and the moderators will need to approve or decline.\n- If the user is already having a pending invitation from moderators, the request will be auto-approved.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "responses": { "200": { "description": "Join Community Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "joinRequests": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a join request." }, "networkId": { "type": "string", "description": "ID of the network." }, "targetId": { "type": "string", "description": "ID of the target entity (community)." }, "targetType": { "type": "string", "description": "Type of the target entity." }, "type": { "type": "string", "description": "Type of the request." }, "userId": { "type": "string", "description": "ID of the user making the request." }, "status": { "type": "string", "description": "Current status of the join request." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "The date/time when the request was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was created." }, "joinRequestId": { "type": "string", "description": "Public ID of the join request." }, "requestorId": { "type": "string", "description": "Public ID of the user who made the request." }, "requestorPublicId": { "type": "string", "description": "Public ID of the requestor." }, "requestorInternalId": { "type": "string", "description": "Internal ID of the requestor." }, "responderId": { "type": "string", "nullable": true, "description": "ID of the user who responded to the request." }, "responderPublicId": { "type": "string", "nullable": true, "description": "Public ID of the responder." }, "responderInternalId": { "type": "string", "nullable": true, "description": "Internal ID of the responder." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } }, "DuplicateEntryError": { "summary": "Data already exists", "value": { "status": "error", "code": 400315, "message": "Data already exists" } }, "MaxRepetitionExceed": { "summary": "User create too many same messages in short period of times.", "value": { "status": "error", "code": 400307, "message": "Max Repetition Exceed" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "409": { "description": "Conflict error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400409, "message": "Conflict error occurred." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Query join requests", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "Retrieves a paginated list of join requests associated with a specific community.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } }, { "name": "type", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "communityJoinRequest" ] } }, { "name": "targetType", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "community" ] } }, { "name": "statuses", "in": "query", "schema": { "type": "array", "items": { "type": "string", "enum": [ "pending", "approved", "rejected", "cancelled" ] } } }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "_id", "respondedAt" ], "default": "_id" } }, { "name": "sortOrder", "in": "query", "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "asc" } }, { "name": "options[limit]", "in": "query", "description": "Number of results per page (1-100)", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 } }, { "name": "options[token]", "in": "query", "description": "Pagination token for getting next/previous pages", "schema": { "type": "string", "maxLength": 1000 } } ], "responses": { "200": { "description": "Query Join Request Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "joinRequests": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a join request." }, "networkId": { "type": "string", "description": "ID of the network." }, "targetId": { "type": "string", "description": "ID of the target entity (community)." }, "targetType": { "type": "string", "description": "Type of the target entity." }, "type": { "type": "string", "description": "Type of the request." }, "userId": { "type": "string", "description": "ID of the user making the request." }, "status": { "type": "string", "description": "Current status of the join request." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "The date/time when the request was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was created." }, "joinRequestId": { "type": "string", "description": "Public ID of the join request." }, "requestorId": { "type": "string", "description": "Public ID of the user who made the request." }, "requestorPublicId": { "type": "string", "description": "Public ID of the requestor." }, "requestorInternalId": { "type": "string", "description": "Internal ID of the requestor." }, "responderId": { "type": "string", "nullable": true, "description": "ID of the user who responded to the request." }, "responderPublicId": { "type": "string", "nullable": true, "description": "Public ID of the responder." }, "responderInternalId": { "type": "string", "nullable": true, "description": "Internal ID of the responder." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "paging": { "type": "object", "properties": { "next": { "type": "string", "example": "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==" }, "previous": { "type": "string", "example": "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==" } } } } } } } }, "403": { "description": "You are not allowed to do this", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Users do not have permission.": { "value": { "status": "error", "code": 400300, "message": "You are not allowed to do this" } } } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Cancel join requests", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "Cancels a user's pending join request to a specific community.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "responses": { "200": { "description": "Count of join requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/communities/{communityId}/join/me": { "get": { "summary": "Get user's join requests", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "Retrieves a list of join requests associated with the user's account that belong to a specific community.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "responses": { "200": { "description": "Query Join Request Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "joinRequests": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a join request." }, "networkId": { "type": "string", "description": "ID of the network." }, "targetId": { "type": "string", "description": "ID of the target entity (community)." }, "targetType": { "type": "string", "description": "Type of the target entity." }, "type": { "type": "string", "description": "Type of the request." }, "userId": { "type": "string", "description": "ID of the user making the request." }, "status": { "type": "string", "description": "Current status of the join request." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "The date/time when the request was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was created." }, "joinRequestId": { "type": "string", "description": "Public ID of the join request." }, "requestorId": { "type": "string", "description": "Public ID of the user who made the request." }, "requestorPublicId": { "type": "string", "description": "Public ID of the requestor." }, "requestorInternalId": { "type": "string", "description": "Internal ID of the requestor." }, "responderId": { "type": "string", "nullable": true, "description": "ID of the user who responded to the request." }, "responderPublicId": { "type": "string", "nullable": true, "description": "Public ID of the responder." }, "responderInternalId": { "type": "string", "nullable": true, "description": "Internal ID of the responder." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "paging": { "type": "object", "properties": { "next": { "type": "string", "example": "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==" }, "previous": { "type": "string", "example": "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==" } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/communities/{communityId}/join/approve": { "post": { "summary": "Approve a join request", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "This API allows moderators to approve a community join requests and add the user to the community.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string" } }, "required": [ "userId" ] } } } }, "responses": { "200": { "description": "Approve and Reject Join Request Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "403": { "description": "You are not allowed to do this", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Users do not have permission.": { "value": { "status": "error", "code": 400300, "message": "You are not allowed to do this" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/communities/{communityId}/join/reject": { "post": { "summary": "Reject a join request", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "This API allows moderators to reject a community join requests.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string" } }, "required": [ "userId" ] } } } }, "responses": { "200": { "description": "Approve and Reject Join Request Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "403": { "description": "You are not allowed to do this", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Users do not have permission.": { "value": { "status": "error", "code": 400300, "message": "You are not allowed to do this" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/communities/{communityId}/join/count": { "get": { "summary": "Count join requests", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "This API allows user to count the number of pending join requests in a community.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "responses": { "200": { "description": "Count of join requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "count": { "type": "integer" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/communities/{communityId}/join/requests": { "get": { "summary": "Get join request list", "tags": [ "Community" ], "security": [ { "BearerAuth": [] } ], "description": "Retrieves a list of latest join requests associated with the user's account that belong to a specific community.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "responses": { "200": { "description": "Query Join Request Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "joinRequests": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a join request." }, "networkId": { "type": "string", "description": "ID of the network." }, "targetId": { "type": "string", "description": "ID of the target entity (community)." }, "targetType": { "type": "string", "description": "Type of the target entity." }, "type": { "type": "string", "description": "Type of the request." }, "userId": { "type": "string", "description": "ID of the user making the request." }, "status": { "type": "string", "description": "Current status of the join request." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "The date/time when the request was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was created." }, "joinRequestId": { "type": "string", "description": "Public ID of the join request." }, "requestorId": { "type": "string", "description": "Public ID of the user who made the request." }, "requestorPublicId": { "type": "string", "description": "Public ID of the requestor." }, "requestorInternalId": { "type": "string", "description": "Internal ID of the requestor." }, "responderId": { "type": "string", "nullable": true, "description": "ID of the user who responded to the request." }, "responderPublicId": { "type": "string", "nullable": true, "description": "Public ID of the responder." }, "responderInternalId": { "type": "string", "nullable": true, "description": "Internal ID of the responder." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/community-categories": { "get": { "summary": "query community categories.", "tags": [ "Community category" ], "security": [ { "BearerAuth": [] } ], "description": "query community categories.\n", "parameters": [ { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "firstCreated", "lastCreated", "name" ], "default": "name" } }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 }, "token": { "type": "string", "maxLength": 1000 } } } } ], "responses": { "200": { "description": "Community Categories Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "create a community categories.", "tags": [ "Community category" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "information of a community category to be created.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 1000 }, "metadata": { "type": "object" }, "avatarFileId": { "type": "string", "maxLength": 50 } }, "required": [ "name" ] } } } }, "responses": { "200": { "description": "Community Categories Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/community-categories/{categoryId}": { "get": { "summary": "get a community category.", "tags": [ "Community category" ], "security": [ { "BearerAuth": [] } ], "description": "get a community category.\n", "parameters": [ { "name": "categoryId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 50 } } ], "responses": { "200": { "description": "Community Categories Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "update a community categories.", "tags": [ "Community category" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "categoryId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 50 } } ], "requestBody": { "description": "community category information.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "categoryId": { "type": "string", "maxLength": 50 }, "name": { "type": "string", "maxLength": 1000 }, "metadata": { "type": "object" }, "avatarFileId": { "type": "string", "maxLength": 50 } }, "required": [ "categoryId" ] } } } }, "responses": { "200": { "description": "Community Categories Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "delete a community category.", "tags": [ "Community category" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "categoryId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 50 } }, { "in": "query", "name": "categoryId", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 50 }, "description": "Category id" } ], "responses": { "200": { "description": "community category information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/community-categories/list": { "get": { "summary": "get list of community category.", "tags": [ "Community category" ], "security": [ { "BearerAuth": [] } ], "description": "Get list of community category.\n", "parameters": [ { "in": "query", "name": "categoryId", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 50 }, "description": "Category id" } ], "responses": { "200": { "description": "Community Categories Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/events": { "post": { "summary": "Create event", "tags": [ "Event" ], "security": [ { "BearerAuth": [] } ], "description": "Create a new event in a community feed.\n\n**Event Types:**\n- `virtual`: Online event (can have external URL or livestream)\n- `in_person`: Physical event (requires location)\n\n**Important Notes:**\n- Start time must be in the future\n- End time must be after start time\n- Location is required for in-person events\n- Only community members can create events in a community\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "title", "type", "startTime", "originType", "originId" ], "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 60 }, "description": { "type": "string", "maxLength": 1000 }, "type": { "type": "string", "enum": [ "virtual", "in_person" ] }, "startTime": { "type": "string", "format": "date-time" }, "endTime": { "type": "string", "format": "date-time" }, "location": { "type": "string", "maxLength": 200 }, "externalUrl": { "type": "string" }, "coverImageFileId": { "type": "string" }, "originType": { "type": "string", "enum": [ "community" ], "default": "community" }, "originId": { "type": "string" }, "tags": { "type": "array", "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "isLocationVisible": { "type": "boolean", "default": true }, "metadata": { "type": "object" } } } } } }, "responses": { "200": { "description": "Event created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "Unique identifier for the event" }, "userId": { "type": "string", "description": "User ID of the event creator" }, "title": { "type": "string", "description": "Event title", "minLength": 1, "maxLength": 60 }, "description": { "type": "string", "description": "Event description", "maxLength": 1000 }, "type": { "type": "string", "enum": [ "virtual", "in_person" ], "description": "Event type (virtual or in-person)" }, "status": { "type": "string", "enum": [ "scheduled", "live", "ended", "cancelled" ], "description": "Current status of the event" }, "isInviteOnly": { "type": "boolean", "description": "Whether the event is invite-only" }, "startTime": { "type": "string", "format": "date-time", "description": "Event start time (ISO 8601 format)" }, "endTime": { "type": "string", "format": "date-time", "description": "Event end time (ISO 8601 format)" }, "location": { "type": "string", "description": "Physical location address (for in-person events)", "maxLength": 200 }, "externalUrl": { "type": "string", "description": "External URL for virtual events (e.g., Zoom, Teams)" }, "coverImageFileId": { "type": "string", "description": "File ID of the cover image" }, "originId": { "type": "string", "description": "ID of the community where the event is created" }, "originType": { "type": "string", "enum": [ "community" ], "description": "Origin type of the event (currently only 'community')" }, "livestreamId": { "type": "string", "description": "ID of the livestream (for virtual events without external URL)" }, "discussionCommunityId": { "type": "string", "description": "ID of the event discussion community" }, "isLocationVisible": { "type": "boolean", "description": "Whether the location is visible to attendees" }, "isOriginPublic": { "type": "boolean", "description": "Whether the origin community is public" }, "rsvpCount": { "type": "integer", "description": "Number of users who RSVP'd as 'going'" }, "interestedCount": { "type": "integer", "description": "Number of users who RSVP'd as 'interested'" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Event tags for categorization", "maxItems": 5 }, "metadata": { "type": "object", "description": "Additional metadata" }, "isDeleted": { "type": "boolean", "description": "Whether the event is deleted" }, "createdAt": { "type": "string", "format": "date-time", "description": "Event creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Event last update timestamp" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Query events", "tags": [ "Event" ], "security": [ { "BearerAuth": [] } ], "description": "Query events with filters.\n\n**Access Control:**\n- Public community events: visible to everyone\n- Private community events: visible only to members\n\n**Filtering:**\n- By origin (community)\n- By status (scheduled, live, ended, cancelled)\n- By type (virtual, in_person)\n- By time range (startTimeGte, startTimeLte)\n- By tags\n", "parameters": [ { "name": "originType", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "community" ], "default": "community" }, "description": "Origin type of the event (currently only 'community' is supported)\n* `community` - Event created in a community\n" }, { "name": "originId", "in": "query", "required": true, "schema": { "type": "string" }, "description": "ID of the community where the event is created" }, { "name": "userId", "in": "query", "schema": { "type": "string" }, "description": "Filter events by creator user ID (admin only or the user themselves)" }, { "name": "onlyAttendee", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "Filter events where the specified userId has RSVP'd (requires userId parameter)" }, { "name": "status", "in": "query", "schema": { "type": "string", "enum": [ "scheduled", "live", "ended", "cancelled" ], "default": "scheduled" }, "description": "Event status\n* `scheduled` - Event is scheduled\n* `live` - Event is currently live\n* `ended` - Event has ended\n* `cancelled` - Event is cancelled\n" }, { "name": "type", "in": "query", "schema": { "type": "string", "enum": [ "virtual", "in_person" ] }, "description": "Filter events by type" }, { "name": "tags", "in": "query", "schema": { "type": "array", "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "description": "Event tags for categorization" }, { "name": "startTimeGte", "in": "query", "schema": { "type": "string", "format": "date-time" }, "description": "Filter events with start time greater than or equal to this value" }, { "name": "startTimeLte", "in": "query", "schema": { "type": "string", "format": "date-time" }, "description": "Filter events with start time less than or equal to this value" }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "startTime", "createdAt" ], "default": "startTime" }, "description": "Sort order for events" }, { "name": "orderBy", "in": "query", "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "asc" }, "description": "Sort direction (ascending or descending)" }, { "name": "options[limit]", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 }, "description": "Page size" }, { "name": "options[token]", "in": "query", "schema": { "type": "string" }, "description": "Pagination token" } ], "responses": { "200": { "description": "Events retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "Unique identifier for the event" }, "userId": { "type": "string", "description": "User ID of the event creator" }, "title": { "type": "string", "description": "Event title", "minLength": 1, "maxLength": 60 }, "description": { "type": "string", "description": "Event description", "maxLength": 1000 }, "type": { "type": "string", "enum": [ "virtual", "in_person" ], "description": "Event type (virtual or in-person)" }, "status": { "type": "string", "enum": [ "scheduled", "live", "ended", "cancelled" ], "description": "Current status of the event" }, "isInviteOnly": { "type": "boolean", "description": "Whether the event is invite-only" }, "startTime": { "type": "string", "format": "date-time", "description": "Event start time (ISO 8601 format)" }, "endTime": { "type": "string", "format": "date-time", "description": "Event end time (ISO 8601 format)" }, "location": { "type": "string", "description": "Physical location address (for in-person events)", "maxLength": 200 }, "externalUrl": { "type": "string", "description": "External URL for virtual events (e.g., Zoom, Teams)" }, "coverImageFileId": { "type": "string", "description": "File ID of the cover image" }, "originId": { "type": "string", "description": "ID of the community where the event is created" }, "originType": { "type": "string", "enum": [ "community" ], "description": "Origin type of the event (currently only 'community')" }, "livestreamId": { "type": "string", "description": "ID of the livestream (for virtual events without external URL)" }, "discussionCommunityId": { "type": "string", "description": "ID of the event discussion community" }, "isLocationVisible": { "type": "boolean", "description": "Whether the location is visible to attendees" }, "isOriginPublic": { "type": "boolean", "description": "Whether the origin community is public" }, "rsvpCount": { "type": "integer", "description": "Number of users who RSVP'd as 'going'" }, "interestedCount": { "type": "integer", "description": "Number of users who RSVP'd as 'interested'" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Event tags for categorization", "maxItems": 5 }, "metadata": { "type": "object", "description": "Additional metadata" }, "isDeleted": { "type": "boolean", "description": "Whether the event is deleted" }, "createdAt": { "type": "string", "format": "date-time", "description": "Event creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Event last update timestamp" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/events/me/rsvp": { "get": { "summary": "Query my RSVPs", "tags": [ "Event" ], "security": [ { "BearerAuth": [] } ], "description": "Get all events the current user has RSVP'd to.\n\n**Filtering:**\n- By RSVP status (going, interested, not_going)\n- Supports pagination\n", "parameters": [ { "name": "status", "in": "query", "schema": { "type": "array", "items": { "type": "string", "enum": [ "going", "interested", "not_going" ] }, "default": [ "going", "interested", "not_going" ] }, "description": "Filter RSVPs by status" }, { "name": "options[limit]", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 }, "description": "Page size" }, { "name": "options[token]", "in": "query", "schema": { "type": "string" }, "description": "Pagination token" } ], "responses": { "200": { "description": "My RSVPs retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "Unique identifier for the event" }, "userId": { "type": "string", "description": "User ID of the event creator" }, "title": { "type": "string", "description": "Event title", "minLength": 1, "maxLength": 60 }, "description": { "type": "string", "description": "Event description", "maxLength": 1000 }, "type": { "type": "string", "enum": [ "virtual", "in_person" ], "description": "Event type (virtual or in-person)" }, "status": { "type": "string", "enum": [ "scheduled", "live", "ended", "cancelled" ], "description": "Current status of the event" }, "isInviteOnly": { "type": "boolean", "description": "Whether the event is invite-only" }, "startTime": { "type": "string", "format": "date-time", "description": "Event start time (ISO 8601 format)" }, "endTime": { "type": "string", "format": "date-time", "description": "Event end time (ISO 8601 format)" }, "location": { "type": "string", "description": "Physical location address (for in-person events)", "maxLength": 200 }, "externalUrl": { "type": "string", "description": "External URL for virtual events (e.g., Zoom, Teams)" }, "coverImageFileId": { "type": "string", "description": "File ID of the cover image" }, "originId": { "type": "string", "description": "ID of the community where the event is created" }, "originType": { "type": "string", "enum": [ "community" ], "description": "Origin type of the event (currently only 'community')" }, "livestreamId": { "type": "string", "description": "ID of the livestream (for virtual events without external URL)" }, "discussionCommunityId": { "type": "string", "description": "ID of the event discussion community" }, "isLocationVisible": { "type": "boolean", "description": "Whether the location is visible to attendees" }, "isOriginPublic": { "type": "boolean", "description": "Whether the origin community is public" }, "rsvpCount": { "type": "integer", "description": "Number of users who RSVP'd as 'going'" }, "interestedCount": { "type": "integer", "description": "Number of users who RSVP'd as 'interested'" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Event tags for categorization", "maxItems": 5 }, "metadata": { "type": "object", "description": "Additional metadata" }, "isDeleted": { "type": "boolean", "description": "Whether the event is deleted" }, "createdAt": { "type": "string", "format": "date-time", "description": "Event creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Event last update timestamp" } } } }, "eventResponses": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "ID of the event" }, "userId": { "type": "string", "description": "User ID of the user who RSVP'd" }, "status": { "type": "string", "enum": [ "going", "interested", "not_going" ], "description": "RSVP status" }, "respondedAt": { "type": "string", "format": "date-time", "description": "When the user responded" }, "createdAt": { "type": "string", "format": "date-time", "description": "RSVP creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "RSVP last update timestamp" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/events/{eventId}": { "get": { "summary": "Get event by ID", "tags": [ "Event" ], "security": [ { "BearerAuth": [] } ], "description": "Get event details by ID.\n\n**Access Control:**\n- Public community events: accessible to everyone\n- Private community events: accessible only to members\n- Creator always has access\n", "parameters": [ { "name": "eventId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the event" } ], "responses": { "200": { "description": "Event details retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "Unique identifier for the event" }, "userId": { "type": "string", "description": "User ID of the event creator" }, "title": { "type": "string", "description": "Event title", "minLength": 1, "maxLength": 60 }, "description": { "type": "string", "description": "Event description", "maxLength": 1000 }, "type": { "type": "string", "enum": [ "virtual", "in_person" ], "description": "Event type (virtual or in-person)" }, "status": { "type": "string", "enum": [ "scheduled", "live", "ended", "cancelled" ], "description": "Current status of the event" }, "isInviteOnly": { "type": "boolean", "description": "Whether the event is invite-only" }, "startTime": { "type": "string", "format": "date-time", "description": "Event start time (ISO 8601 format)" }, "endTime": { "type": "string", "format": "date-time", "description": "Event end time (ISO 8601 format)" }, "location": { "type": "string", "description": "Physical location address (for in-person events)", "maxLength": 200 }, "externalUrl": { "type": "string", "description": "External URL for virtual events (e.g., Zoom, Teams)" }, "coverImageFileId": { "type": "string", "description": "File ID of the cover image" }, "originId": { "type": "string", "description": "ID of the community where the event is created" }, "originType": { "type": "string", "enum": [ "community" ], "description": "Origin type of the event (currently only 'community')" }, "livestreamId": { "type": "string", "description": "ID of the livestream (for virtual events without external URL)" }, "discussionCommunityId": { "type": "string", "description": "ID of the event discussion community" }, "isLocationVisible": { "type": "boolean", "description": "Whether the location is visible to attendees" }, "isOriginPublic": { "type": "boolean", "description": "Whether the origin community is public" }, "rsvpCount": { "type": "integer", "description": "Number of users who RSVP'd as 'going'" }, "interestedCount": { "type": "integer", "description": "Number of users who RSVP'd as 'interested'" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Event tags for categorization", "maxItems": 5 }, "metadata": { "type": "object", "description": "Additional metadata" }, "isDeleted": { "type": "boolean", "description": "Whether the event is deleted" }, "createdAt": { "type": "string", "format": "date-time", "description": "Event creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Event last update timestamp" } } } }, "eventResponses": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "ID of the event" }, "userId": { "type": "string", "description": "User ID of the user who RSVP'd" }, "status": { "type": "string", "enum": [ "going", "interested", "not_going" ], "description": "RSVP status" }, "respondedAt": { "type": "string", "format": "date-time", "description": "When the user responded" }, "createdAt": { "type": "string", "format": "date-time", "description": "RSVP creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "RSVP last update timestamp" } } }, "description": "Current user's RSVP for this event (if exists)" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "Update event", "tags": [ "Event" ], "security": [ { "BearerAuth": [] } ], "description": "Update event details. Only the event creator or admin can update.\n\n**Important Notes:**\n- Start time must be in the future\n- End time must be after start time\n- Can cancel event by setting status to 'cancelled'\n- Cancelling an event will delete all scheduled reminders\n", "parameters": [ { "name": "eventId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the event" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 60 }, "description": { "type": "string", "maxLength": 1000 }, "type": { "type": "string", "enum": [ "virtual", "in_person" ] }, "startTime": { "type": "string", "format": "date-time" }, "endTime": { "type": "string", "format": "date-time" }, "location": { "type": "string", "maxLength": 200 }, "externalUrl": { "type": "string" }, "coverImageFileId": { "type": "string" }, "tags": { "type": "array", "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "status": { "type": "string", "enum": [ "cancelled" ] }, "metadata": { "type": "object" } } } } } }, "responses": { "200": { "description": "Event updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "Unique identifier for the event" }, "userId": { "type": "string", "description": "User ID of the event creator" }, "title": { "type": "string", "description": "Event title", "minLength": 1, "maxLength": 60 }, "description": { "type": "string", "description": "Event description", "maxLength": 1000 }, "type": { "type": "string", "enum": [ "virtual", "in_person" ], "description": "Event type (virtual or in-person)" }, "status": { "type": "string", "enum": [ "scheduled", "live", "ended", "cancelled" ], "description": "Current status of the event" }, "isInviteOnly": { "type": "boolean", "description": "Whether the event is invite-only" }, "startTime": { "type": "string", "format": "date-time", "description": "Event start time (ISO 8601 format)" }, "endTime": { "type": "string", "format": "date-time", "description": "Event end time (ISO 8601 format)" }, "location": { "type": "string", "description": "Physical location address (for in-person events)", "maxLength": 200 }, "externalUrl": { "type": "string", "description": "External URL for virtual events (e.g., Zoom, Teams)" }, "coverImageFileId": { "type": "string", "description": "File ID of the cover image" }, "originId": { "type": "string", "description": "ID of the community where the event is created" }, "originType": { "type": "string", "enum": [ "community" ], "description": "Origin type of the event (currently only 'community')" }, "livestreamId": { "type": "string", "description": "ID of the livestream (for virtual events without external URL)" }, "discussionCommunityId": { "type": "string", "description": "ID of the event discussion community" }, "isLocationVisible": { "type": "boolean", "description": "Whether the location is visible to attendees" }, "isOriginPublic": { "type": "boolean", "description": "Whether the origin community is public" }, "rsvpCount": { "type": "integer", "description": "Number of users who RSVP'd as 'going'" }, "interestedCount": { "type": "integer", "description": "Number of users who RSVP'd as 'interested'" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Event tags for categorization", "maxItems": 5 }, "metadata": { "type": "object", "description": "Additional metadata" }, "isDeleted": { "type": "boolean", "description": "Whether the event is deleted" }, "createdAt": { "type": "string", "format": "date-time", "description": "Event creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Event last update timestamp" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Delete event", "tags": [ "Event" ], "security": [ { "BearerAuth": [] } ], "description": "Soft delete an event. Only the event creator or admin can delete.\n\n**Important Notes:**\n- All scheduled reminders will be deleted\n", "parameters": [ { "name": "eventId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the event" } ], "responses": { "200": { "description": "Event deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "example": true } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/events/{eventId}/rsvp": { "post": { "summary": "Create RSVP", "tags": [ "Event" ], "security": [ { "BearerAuth": [] } ], "description": "RSVP to an event. Creates a new RSVP entry.\n\n**RSVP Statuses:**\n- `going`: User is going to the event (auto-joins event discussion community)\n- `interested`: User is interested in the event\n- `not_going`: User is not going to the event\n", "parameters": [ { "name": "eventId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the event" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "enum": [ "going", "interested", "not_going" ] } } } } } }, "responses": { "200": { "description": "RSVP created/updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "Unique identifier for the event" }, "userId": { "type": "string", "description": "User ID of the event creator" }, "title": { "type": "string", "description": "Event title", "minLength": 1, "maxLength": 60 }, "description": { "type": "string", "description": "Event description", "maxLength": 1000 }, "type": { "type": "string", "enum": [ "virtual", "in_person" ], "description": "Event type (virtual or in-person)" }, "status": { "type": "string", "enum": [ "scheduled", "live", "ended", "cancelled" ], "description": "Current status of the event" }, "isInviteOnly": { "type": "boolean", "description": "Whether the event is invite-only" }, "startTime": { "type": "string", "format": "date-time", "description": "Event start time (ISO 8601 format)" }, "endTime": { "type": "string", "format": "date-time", "description": "Event end time (ISO 8601 format)" }, "location": { "type": "string", "description": "Physical location address (for in-person events)", "maxLength": 200 }, "externalUrl": { "type": "string", "description": "External URL for virtual events (e.g., Zoom, Teams)" }, "coverImageFileId": { "type": "string", "description": "File ID of the cover image" }, "originId": { "type": "string", "description": "ID of the community where the event is created" }, "originType": { "type": "string", "enum": [ "community" ], "description": "Origin type of the event (currently only 'community')" }, "livestreamId": { "type": "string", "description": "ID of the livestream (for virtual events without external URL)" }, "discussionCommunityId": { "type": "string", "description": "ID of the event discussion community" }, "isLocationVisible": { "type": "boolean", "description": "Whether the location is visible to attendees" }, "isOriginPublic": { "type": "boolean", "description": "Whether the origin community is public" }, "rsvpCount": { "type": "integer", "description": "Number of users who RSVP'd as 'going'" }, "interestedCount": { "type": "integer", "description": "Number of users who RSVP'd as 'interested'" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Event tags for categorization", "maxItems": 5 }, "metadata": { "type": "object", "description": "Additional metadata" }, "isDeleted": { "type": "boolean", "description": "Whether the event is deleted" }, "createdAt": { "type": "string", "format": "date-time", "description": "Event creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Event last update timestamp" } } } }, "eventResponses": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "ID of the event" }, "userId": { "type": "string", "description": "User ID of the user who RSVP'd" }, "status": { "type": "string", "enum": [ "going", "interested", "not_going" ], "description": "RSVP status" }, "respondedAt": { "type": "string", "format": "date-time", "description": "When the user responded" }, "createdAt": { "type": "string", "format": "date-time", "description": "RSVP creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "RSVP last update timestamp" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "Update RSVP", "tags": [ "Event" ], "security": [ { "BearerAuth": [] } ], "description": "Update an existing RSVP to an event.\n\n**RSVP Statuses:**\n- `going`: User is going to the event (auto-joins event discussion community)\n- `interested`: User is interested in the event (auto-leaves if previously going)\n- `not_going`: User is not going to the event (auto-leaves if previously going)\n", "parameters": [ { "name": "eventId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the event" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "enum": [ "going", "interested", "not_going" ] } } } } } }, "responses": { "200": { "description": "RSVP created/updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "Unique identifier for the event" }, "userId": { "type": "string", "description": "User ID of the event creator" }, "title": { "type": "string", "description": "Event title", "minLength": 1, "maxLength": 60 }, "description": { "type": "string", "description": "Event description", "maxLength": 1000 }, "type": { "type": "string", "enum": [ "virtual", "in_person" ], "description": "Event type (virtual or in-person)" }, "status": { "type": "string", "enum": [ "scheduled", "live", "ended", "cancelled" ], "description": "Current status of the event" }, "isInviteOnly": { "type": "boolean", "description": "Whether the event is invite-only" }, "startTime": { "type": "string", "format": "date-time", "description": "Event start time (ISO 8601 format)" }, "endTime": { "type": "string", "format": "date-time", "description": "Event end time (ISO 8601 format)" }, "location": { "type": "string", "description": "Physical location address (for in-person events)", "maxLength": 200 }, "externalUrl": { "type": "string", "description": "External URL for virtual events (e.g., Zoom, Teams)" }, "coverImageFileId": { "type": "string", "description": "File ID of the cover image" }, "originId": { "type": "string", "description": "ID of the community where the event is created" }, "originType": { "type": "string", "enum": [ "community" ], "description": "Origin type of the event (currently only 'community')" }, "livestreamId": { "type": "string", "description": "ID of the livestream (for virtual events without external URL)" }, "discussionCommunityId": { "type": "string", "description": "ID of the event discussion community" }, "isLocationVisible": { "type": "boolean", "description": "Whether the location is visible to attendees" }, "isOriginPublic": { "type": "boolean", "description": "Whether the origin community is public" }, "rsvpCount": { "type": "integer", "description": "Number of users who RSVP'd as 'going'" }, "interestedCount": { "type": "integer", "description": "Number of users who RSVP'd as 'interested'" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Event tags for categorization", "maxItems": 5 }, "metadata": { "type": "object", "description": "Additional metadata" }, "isDeleted": { "type": "boolean", "description": "Whether the event is deleted" }, "createdAt": { "type": "string", "format": "date-time", "description": "Event creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Event last update timestamp" } } } }, "eventResponses": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "ID of the event" }, "userId": { "type": "string", "description": "User ID of the user who RSVP'd" }, "status": { "type": "string", "enum": [ "going", "interested", "not_going" ], "description": "RSVP status" }, "respondedAt": { "type": "string", "format": "date-time", "description": "When the user responded" }, "createdAt": { "type": "string", "format": "date-time", "description": "RSVP creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "RSVP last update timestamp" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Get event attendees", "tags": [ "Event" ], "security": [ { "BearerAuth": [] } ], "description": "Get list of users who RSVP'd to an event.\n\n**Filtering:**\n- By RSVP status (going, interested, not_going)\n- Supports pagination\n", "parameters": [ { "name": "eventId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the event" }, { "name": "status", "in": "query", "schema": { "type": "array", "items": { "type": "string", "enum": [ "going", "interested", "not_going" ] }, "default": [ "going", "interested", "not_going" ] }, "description": "Filter RSVPs by status" }, { "name": "options[limit]", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 }, "description": "Page size" }, { "name": "options[token]", "in": "query", "schema": { "type": "string" }, "description": "Pagination token" } ], "responses": { "200": { "description": "RSVPs retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "Unique identifier for the event" }, "userId": { "type": "string", "description": "User ID of the event creator" }, "title": { "type": "string", "description": "Event title", "minLength": 1, "maxLength": 60 }, "description": { "type": "string", "description": "Event description", "maxLength": 1000 }, "type": { "type": "string", "enum": [ "virtual", "in_person" ], "description": "Event type (virtual or in-person)" }, "status": { "type": "string", "enum": [ "scheduled", "live", "ended", "cancelled" ], "description": "Current status of the event" }, "isInviteOnly": { "type": "boolean", "description": "Whether the event is invite-only" }, "startTime": { "type": "string", "format": "date-time", "description": "Event start time (ISO 8601 format)" }, "endTime": { "type": "string", "format": "date-time", "description": "Event end time (ISO 8601 format)" }, "location": { "type": "string", "description": "Physical location address (for in-person events)", "maxLength": 200 }, "externalUrl": { "type": "string", "description": "External URL for virtual events (e.g., Zoom, Teams)" }, "coverImageFileId": { "type": "string", "description": "File ID of the cover image" }, "originId": { "type": "string", "description": "ID of the community where the event is created" }, "originType": { "type": "string", "enum": [ "community" ], "description": "Origin type of the event (currently only 'community')" }, "livestreamId": { "type": "string", "description": "ID of the livestream (for virtual events without external URL)" }, "discussionCommunityId": { "type": "string", "description": "ID of the event discussion community" }, "isLocationVisible": { "type": "boolean", "description": "Whether the location is visible to attendees" }, "isOriginPublic": { "type": "boolean", "description": "Whether the origin community is public" }, "rsvpCount": { "type": "integer", "description": "Number of users who RSVP'd as 'going'" }, "interestedCount": { "type": "integer", "description": "Number of users who RSVP'd as 'interested'" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Event tags for categorization", "maxItems": 5 }, "metadata": { "type": "object", "description": "Additional metadata" }, "isDeleted": { "type": "boolean", "description": "Whether the event is deleted" }, "createdAt": { "type": "string", "format": "date-time", "description": "Event creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Event last update timestamp" } } } }, "eventResponses": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "ID of the event" }, "userId": { "type": "string", "description": "User ID of the user who RSVP'd" }, "status": { "type": "string", "enum": [ "going", "interested", "not_going" ], "description": "RSVP status" }, "respondedAt": { "type": "string", "format": "date-time", "description": "When the user responded" }, "createdAt": { "type": "string", "format": "date-time", "description": "RSVP creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "RSVP last update timestamp" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/events/{eventId}/me/rsvp": { "get": { "summary": "Get my RSVP for an event", "tags": [ "Event" ], "security": [ { "BearerAuth": [] } ], "description": "Get the current user's RSVP for a specific event.\n", "parameters": [ { "name": "eventId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the event" } ], "responses": { "200": { "description": "RSVP retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "Unique identifier for the event" }, "userId": { "type": "string", "description": "User ID of the event creator" }, "title": { "type": "string", "description": "Event title", "minLength": 1, "maxLength": 60 }, "description": { "type": "string", "description": "Event description", "maxLength": 1000 }, "type": { "type": "string", "enum": [ "virtual", "in_person" ], "description": "Event type (virtual or in-person)" }, "status": { "type": "string", "enum": [ "scheduled", "live", "ended", "cancelled" ], "description": "Current status of the event" }, "isInviteOnly": { "type": "boolean", "description": "Whether the event is invite-only" }, "startTime": { "type": "string", "format": "date-time", "description": "Event start time (ISO 8601 format)" }, "endTime": { "type": "string", "format": "date-time", "description": "Event end time (ISO 8601 format)" }, "location": { "type": "string", "description": "Physical location address (for in-person events)", "maxLength": 200 }, "externalUrl": { "type": "string", "description": "External URL for virtual events (e.g., Zoom, Teams)" }, "coverImageFileId": { "type": "string", "description": "File ID of the cover image" }, "originId": { "type": "string", "description": "ID of the community where the event is created" }, "originType": { "type": "string", "enum": [ "community" ], "description": "Origin type of the event (currently only 'community')" }, "livestreamId": { "type": "string", "description": "ID of the livestream (for virtual events without external URL)" }, "discussionCommunityId": { "type": "string", "description": "ID of the event discussion community" }, "isLocationVisible": { "type": "boolean", "description": "Whether the location is visible to attendees" }, "isOriginPublic": { "type": "boolean", "description": "Whether the origin community is public" }, "rsvpCount": { "type": "integer", "description": "Number of users who RSVP'd as 'going'" }, "interestedCount": { "type": "integer", "description": "Number of users who RSVP'd as 'interested'" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Event tags for categorization", "maxItems": 5 }, "metadata": { "type": "object", "description": "Additional metadata" }, "isDeleted": { "type": "boolean", "description": "Whether the event is deleted" }, "createdAt": { "type": "string", "format": "date-time", "description": "Event creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Event last update timestamp" } } } }, "eventResponses": { "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "description": "ID of the event" }, "userId": { "type": "string", "description": "User ID of the user who RSVP'd" }, "status": { "type": "string", "enum": [ "going", "interested", "not_going" ], "description": "RSVP status" }, "respondedAt": { "type": "string", "format": "date-time", "description": "When the user responded" }, "createdAt": { "type": "string", "format": "date-time", "description": "RSVP creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "RSVP last update timestamp" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/content-histories": { "get": { "summary": "Retrieve edit history for content", "tags": [ "Content" ], "security": [ { "BearerAuth": [] } ], "description": "Retrieve the edit history for a specific piece of content (post or comment).\nOnly administrators with EDIT_POST_AND_COMMENT permission can access this endpoint.\n", "parameters": [ { "name": "contentId", "in": "query", "required": true, "schema": { "type": "string" }, "description": "The public ID of the content (post or comment)" }, { "name": "contentType", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "post", "comment" ] }, "description": "The type of content" } ], "responses": { "200": { "description": "Content edit history retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "histories": { "type": "array", "items": { "type": "object", "required": [ "_id", "networkId", "contentId", "contentType", "version", "data", "editedBy", "editedAt", "createdAt", "updatedAt" ], "properties": { "_id": { "type": "string", "description": "MongoDB ObjectId", "example": "507f1f77bcf86cd799439011" }, "networkId": { "type": "string", "description": "Network identifier", "example": "network123" }, "contentId": { "type": "string", "description": "Post or Comment ID", "example": "post456" }, "contentType": { "type": "string", "enum": [ "post", "comment" ], "description": "Type of content", "example": "post" }, "version": { "type": "integer", "description": "Version number of the edit (0 = original)", "example": 1 }, "data": { "oneOf": [ { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream", "clip" ], "description": "Type of a post (ex. text, image, file, video, clip or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "description": "Body of a post. Can be different types based on content type.", "oneOf": [ { "type": "object", "title": "normal post", "description": "Standard post data (text, image, file, video)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, { "type": "object", "title": "clip post", "description": "clip post data", "properties": { "fileId": { "type": "string", "description": "file key on cloud storage." }, "thumbnailId": { "type": "string", "description": "thumbnail file id." }, "isMuted": { "type": "boolean", "description": "whether the video is muted.", "default": false }, "displayMode": { "type": "string", "description": "display mode for the video.", "enum": [ "fill", "fit" ], "default": "fill" } } } ] }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "video_content" }, "example": [ "video_content", "clips_feature", "multimedia_posts", "next_gen_social" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "mobile_app" }, "example": [ "mobile_app", "user_experience", "API_v4", "social_platform" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } }, { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } ], "description": "Complete content payload snapshot at this version" }, "editedBy": { "type": "string", "description": "Admin user ID who made the edit", "example": "admin123" }, "editedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the edit was made", "example": "2025-01-15T10:30:00Z" }, "editReason": { "type": "string", "nullable": true, "description": "Optional reason provided for the edit (max 500 chars)", "example": "Fixed spelling error" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the history record was created", "example": "2025-01-15T10:30:00Z" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the history record was last updated", "example": "2025-01-15T10:30:00Z" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/invitations": { "get": { "summary": "Get invitations", "tags": [ "Invitation" ], "security": [ { "BearerAuth": [] } ], "description": "Retrieves a paginated list of invitations that belong to a specific community.\n", "parameters": [ { "name": "type", "in": "query", "description": "Filter invitations by type", "required": true, "schema": { "type": "string", "enum": [ "communityMemberInvite", "livestreamCohostInvite" ] }, "example": "communityMemberInvite" }, { "name": "targetType", "in": "query", "description": "Filter by target entity type", "required": true, "schema": { "type": "string", "enum": [ "community", "room" ] }, "example": "community" }, { "name": "targetId", "in": "query", "description": "Filter by specific target entity ID", "required": true, "schema": { "type": "string", "maxLength": 900 }, "example": "60f1234567890abcdef12345" }, { "name": "options[after]", "in": "query", "description": "Pagination after cursor", "schema": { "type": "string", "maxLength": 24 }, "example": "60f1234567890abcdef12" }, { "name": "options[before]", "in": "query", "description": "Pagination before cursor", "schema": { "type": "string", "maxLength": 24 }, "example": "60f1234567890abcdef12" }, { "name": "options[limit]", "in": "query", "description": "Number of results per page (positive integer)", "schema": { "type": "integer", "minimum": 1, "default": 10 }, "example": 10 }, { "name": "options[token]", "in": "query", "description": "Pagination token", "schema": { "type": "string", "maxLength": 1000 }, "example": "eyJhZnRlciI6eyJfaWQiOiI2MDZmMzdhM2FlNjAxZWYzNzRlYmFhMDEifX0=" }, { "name": "statuses", "in": "query", "description": "Filter invitations by status (array, optional)", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "pending", "approved", "rejected", "cancelled" ] } }, "example": [ "pending", "approved" ] }, { "name": "sortBy", "in": "query", "description": "Sort invitations by field (optional)", "required": false, "schema": { "type": "string", "enum": [ "_id", "createdAt", "respondedAt" ], "default": "createdAt" }, "example": "createdAt" }, { "name": "sortOrder", "in": "query", "description": "Sort order (optional)", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc" }, "example": "desc" } ], "responses": { "200": { "description": "List of invitations", "content": { "application/json": { "schema": { "type": "object", "properties": { "invitations": { "type": "array", "description": "List of invitation objects", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of the invitation." }, "networkId": { "type": "string", "description": "ID of the network." }, "type": { "type": "string", "description": "Type of invitation.", "enum": [ "communityMemberInvite" ] }, "targetId": { "type": "string", "description": "ID of the target entity (community, group, etc.)." }, "targetType": { "type": "string", "description": "Type of target entity.", "enum": [ "community" ] }, "userId": { "type": "string", "description": "ID of the user who received the invitation." }, "status": { "type": "string", "description": "Current status of the invitation.", "enum": [ "pending", "approved", "rejected", "cancelled" ] }, "createdBy": { "type": "string", "description": "ID of the user who created the invitation." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "When the invitation was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the invitation was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "When the invitation was created." }, "invitationId": { "type": "string", "description": "Public ID of the invitation." }, "invitedUserId": { "type": "string", "description": "User ID of the invited user." }, "invitedUserPublicId": { "type": "string", "description": "Public ID of the invited user." }, "invitedUserInternalId": { "type": "string", "description": "Internal ID of the invited user." }, "inviterUserId": { "type": "string", "description": "User ID of the inviter." }, "inviterUserPublicId": { "type": "string", "description": "Public ID of the inviter." }, "inviterUserInternalId": { "type": "string", "description": "Internal ID of the inviter." }, "communityId": { "type": "string", "description": "ID of the community (for community invitations).", "nullable": true } }, "required": [ "_id", "networkId", "type", "targetId", "targetType", "userId", "status", "createdBy", "createdAt", "updatedAt", "invitationId", "invitedUserId", "invitedUserPublicId", "invitedUserInternalId", "inviterUserId", "inviterUserPublicId", "inviterUserInternalId" ] } }, "users": { "type": "array", "description": "User details for inviters and invitees", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "Create invitations", "tags": [ "Invitation" ], "security": [ { "BearerAuth": [] } ], "description": "Creates new invitations for the specified users to join a target entity (community, group, or event).\n", "requestBody": { "description": "Create invitation request payload", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of invitation to create", "enum": [ "communityMemberInvite", "livestreamCohostInvite" ], "example": "communityMemberInvite" }, "targetType": { "type": "string", "description": "Type of target entity", "enum": [ "community", "room" ], "example": "community" }, "targetId": { "type": "string", "description": "ID of the target entity (community, group, etc.)", "minLength": 1, "maxLength": 900, "example": "68583742eae5300158b6d144" }, "userIds": { "type": "array", "description": "Array of user IDs to invite", "minItems": 1, "maxItems": 1000, "items": { "type": "string", "minLength": 1, "maxLength": 50, "description": "User ID to invite" }, "example": [ "user123", "user456", "user789" ] } }, "required": [ "type", "targetType", "targetId", "userIds" ] }, "examples": { "community-invitation": { "summary": "Create community member invitations", "value": { "type": "communityMemberInvite", "targetType": "community", "targetId": "68583742eae5300158b6d144", "userIds": [ "B user", "C user" ] } } } } } }, "responses": { "200": { "description": "Create invitation response", "content": { "application/json": { "schema": { "type": "object", "properties": { "invitations": { "type": "array", "description": "Array of created invitation objects", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of the invitation." }, "networkId": { "type": "string", "description": "ID of the network." }, "type": { "type": "string", "description": "Type of invitation.", "enum": [ "communityMemberInvite" ] }, "targetId": { "type": "string", "description": "ID of the target entity (community, group, etc.)." }, "targetType": { "type": "string", "description": "Type of target entity.", "enum": [ "community" ] }, "userId": { "type": "string", "description": "ID of the user who received the invitation." }, "status": { "type": "string", "description": "Current status of the invitation.", "enum": [ "pending", "approved", "rejected", "cancelled" ] }, "createdBy": { "type": "string", "description": "ID of the user who created the invitation." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "When the invitation was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the invitation was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "When the invitation was created." }, "invitationId": { "type": "string", "description": "Public ID of the invitation." }, "invitedUserId": { "type": "string", "description": "User ID of the invited user." }, "invitedUserPublicId": { "type": "string", "description": "Public ID of the invited user." }, "invitedUserInternalId": { "type": "string", "description": "Internal ID of the invited user." }, "inviterUserId": { "type": "string", "description": "User ID of the inviter." }, "inviterUserPublicId": { "type": "string", "description": "Public ID of the inviter." }, "inviterUserInternalId": { "type": "string", "description": "Internal ID of the inviter." }, "communityId": { "type": "string", "description": "ID of the community (for community invitations).", "nullable": true } }, "required": [ "_id", "networkId", "type", "targetId", "targetType", "userId", "status", "createdBy", "createdAt", "updatedAt", "invitationId", "invitedUserId", "invitedUserPublicId", "invitedUserInternalId", "inviterUserId", "inviterUserPublicId", "inviterUserInternalId" ] } }, "users": { "type": "array", "description": "User details for invited users", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/invitations/{invitationId}/accept": { "post": { "summary": "Accept an invitation", "tags": [ "Invitation" ], "security": [ { "BearerAuth": [] } ], "description": "Accepts a pending invitation. This will change the invitation status to \"approved\" and perform the associated action (e.g., adding the user to a community).\n", "parameters": [ { "name": "invitationId", "in": "path", "required": true, "description": "ID of the invitation (MongoDB ObjectId)", "schema": { "type": "string", "minLength": 24, "maxLength": 24, "pattern": "^[a-f0-9]{24}$" }, "example": "6858374aeae5300158b6d1be" } ], "responses": { "200": { "description": "Accept invitation response", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Whether the invitation was successfully accepted", "example": true } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/invitations/{invitationId}/reject": { "post": { "summary": "Reject an invitation", "tags": [ "Invitation" ], "security": [ { "BearerAuth": [] } ], "description": "Rejects a pending invitation. This will change the invitation status to \"rejected\".\n", "parameters": [ { "name": "invitationId", "in": "path", "required": true, "description": "ID of the invitation (MongoDB ObjectId)", "schema": { "type": "string", "minLength": 24, "maxLength": 24, "pattern": "^[a-f0-9]{24}$" }, "example": "6858374aeae5300158b6d1be" } ], "responses": { "200": { "description": "Reject invitation response", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Whether the invitation was successfully rejected", "example": true } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/invitations/{invitationId}": { "delete": { "summary": "Cancel an invitation", "tags": [ "Invitation" ], "security": [ { "BearerAuth": [] } ], "description": "Cancels an existing invitation.\n", "parameters": [ { "name": "invitationId", "in": "path", "required": true, "description": "ID of the invitation (MongoDB ObjectId)", "schema": { "type": "string", "minLength": 24, "maxLength": 24, "pattern": "^[a-f0-9]{24}$" }, "example": "6858374aeae5300158b6d1be" } ], "responses": { "200": { "description": "Cancel invitation response", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Whether the invitation was successfully canceled", "example": true } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/invitations/me": { "get": { "summary": "Get my invitations", "tags": [ "Invitation" ], "security": [ { "BearerAuth": [] } ], "description": "Retrieves a paginated list of invitations for the authenticated user. This endpoint returns invitations where the authenticated user is the invitee.\n", "parameters": [ { "name": "type", "in": "query", "description": "Filter invitations by type (optional)", "required": false, "schema": { "type": "string", "enum": [ "communityMemberInvite", "livestreamCohostInvite" ] }, "example": "communityMemberInvite" }, { "name": "targetType", "in": "query", "description": "Filter by target entity type (optional)", "required": false, "schema": { "type": "string", "enum": [ "community", "room" ] }, "example": "community" }, { "name": "targetId", "in": "query", "description": "Filter by specific target entity ID (optional)", "required": false, "schema": { "type": "string", "maxLength": 900 }, "example": "60f1234567890abcdef12345" }, { "name": "options[after]", "in": "query", "description": "Pagination after cursor", "schema": { "type": "string", "maxLength": 24 }, "example": "60f1234567890abcdef12" }, { "name": "options[before]", "in": "query", "description": "Pagination before cursor", "schema": { "type": "string", "maxLength": 24 }, "example": "60f1234567890abcdef12" }, { "name": "options[limit]", "in": "query", "description": "Number of results per page (positive integer)", "schema": { "type": "integer", "minimum": 1, "default": 10 }, "example": 10 }, { "name": "options[token]", "in": "query", "description": "Pagination token", "schema": { "type": "string", "maxLength": 1000 }, "example": "eyJhZnRlciI6eyJfaWQiOiI2MDZmMzdhM2FlNjAxZWYzNzRlYmFhMDEifX0=" } ], "responses": { "200": { "description": "List of invitations", "content": { "application/json": { "schema": { "type": "object", "properties": { "invitations": { "type": "array", "description": "List of invitation objects", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of the invitation." }, "networkId": { "type": "string", "description": "ID of the network." }, "type": { "type": "string", "description": "Type of invitation.", "enum": [ "communityMemberInvite" ] }, "targetId": { "type": "string", "description": "ID of the target entity (community, group, etc.)." }, "targetType": { "type": "string", "description": "Type of target entity.", "enum": [ "community" ] }, "userId": { "type": "string", "description": "ID of the user who received the invitation." }, "status": { "type": "string", "description": "Current status of the invitation.", "enum": [ "pending", "approved", "rejected", "cancelled" ] }, "createdBy": { "type": "string", "description": "ID of the user who created the invitation." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "When the invitation was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the invitation was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "When the invitation was created." }, "invitationId": { "type": "string", "description": "Public ID of the invitation." }, "invitedUserId": { "type": "string", "description": "User ID of the invited user." }, "invitedUserPublicId": { "type": "string", "description": "Public ID of the invited user." }, "invitedUserInternalId": { "type": "string", "description": "Internal ID of the invited user." }, "inviterUserId": { "type": "string", "description": "User ID of the inviter." }, "inviterUserPublicId": { "type": "string", "description": "Public ID of the inviter." }, "inviterUserInternalId": { "type": "string", "description": "Internal ID of the inviter." }, "communityId": { "type": "string", "description": "ID of the community (for community invitations).", "nullable": true } }, "required": [ "_id", "networkId", "type", "targetId", "targetType", "userId", "status", "createdBy", "createdAt", "updatedAt", "invitationId", "invitedUserId", "invitedUserPublicId", "invitedUserInternalId", "inviterUserId", "inviterUserPublicId", "inviterUserInternalId" ] } }, "users": { "type": "array", "description": "User details for inviters and invitees", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/invitations/count": { "get": { "summary": "Count invitations", "tags": [ "Invitation" ], "security": [ { "BearerAuth": [] } ], "description": "Returns the total count of invitations matching the specified criteria. This endpoint is useful for displaying invitation counts in UI without needing to fetch all invitation data.\n", "parameters": [ { "name": "targetId", "in": "query", "description": "Filter by specific target entity ID", "required": true, "schema": { "type": "string", "maxLength": 900 }, "example": "60f1234567890abcdef12345" }, { "name": "targetType", "in": "query", "description": "Filter by target entity type", "required": true, "schema": { "type": "string", "enum": [ "community", "room" ] }, "example": "community" }, { "name": "type", "in": "query", "description": "Filter invitations by type", "required": true, "schema": { "type": "string", "enum": [ "communityMemberInvite", "livestreamCohostInvite" ] }, "example": "communityMemberInvite" }, { "name": "statuses", "in": "query", "description": "Filter invitations by status (array, optional)", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "pending", "approved", "rejected", "cancelled" ] } }, "example": [ "pending", "approved" ] } ], "responses": { "200": { "description": "Count invitations response", "content": { "application/json": { "schema": { "type": "object", "properties": { "count": { "type": "integer", "description": "Total number of invitations matching the criteria", "example": 5 } } }, "examples": { "success": { "summary": "Invitation count", "value": { "count": 5 } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/invitations/{invitationId}/resend": { "post": { "summary": "Resend an invitation", "tags": [ "Invitation" ], "security": [ { "BearerAuth": [] } ], "description": "This API allows invitation creators or authorized users to resend invitations that were declined.\n", "parameters": [ { "name": "invitationId", "in": "path", "required": true, "description": "ID of the invitation (MongoDB ObjectId)", "schema": { "type": "string", "minLength": 24, "maxLength": 24, "pattern": "^[a-f0-9]{24}$" }, "example": "6858374aeae5300158b6d1be" } ], "responses": { "200": { "description": "Resend invitation response", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Whether the invitation was successfully resent", "example": true } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/products": { "post": { "summary": "Create product", "tags": [ "Product" ], "security": [ { "BearerAuth": [] } ], "description": "Create a new product in the product catalogue.\n\n**Access Control:**\n- Requires admin permissions with ManageProducts flag\n\n**Important Notes:**\n- Product ID must be unique within the network\n- Product URL must be a valid URL\n- Price must be positive if provided\n- Currency must be a valid ISO 4217 currency code (3 characters)\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "productId", "productName", "productUrl", "status" ], "properties": { "productId": { "type": "string", "description": "Unique identifier for the product", "minLength": 1, "maxLength": 100, "example": "prod-12345" }, "productName": { "type": "string", "description": "Name of the product", "minLength": 1, "maxLength": 200, "example": "Premium Headphones" }, "productUrl": { "type": "string", "format": "uri", "description": "URL to the product page", "example": "https://example.com/products/premium-headphones" }, "status": { "type": "string", "description": "Product status", "enum": [ "active", "archived" ], "example": "active" }, "price": { "type": "number", "description": "Product price (must be positive)", "minimum": 0, "exclusiveMinimum": true, "example": 99.99 }, "currency": { "type": "string", "description": "ISO 4217 currency code (3 characters)", "minLength": 3, "maxLength": 3, "example": "USD" }, "thumbnailUrl": { "type": "string", "format": "uri", "description": "URL to the product thumbnail image", "example": "https://example.com/images/headphones-thumb.jpg" }, "thumbnailMode": { "type": "string", "description": "How the thumbnail should be displayed", "enum": [ "fit", "fill" ], "example": "fit" } } } } } }, "responses": { "200": { "description": "Successful response with product data", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal MongoDB ID", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "productId": { "type": "string", "description": "Unique identifier for the product", "example": "prod-12345" }, "networkId": { "type": "string", "description": "Network ID the product belongs to", "example": "network-abc123" }, "productName": { "type": "string", "description": "Name of the product", "example": "Premium Headphones" }, "productUrl": { "type": "string", "format": "uri", "description": "URL to the product page", "example": "https://example.com/products/premium-headphones" }, "status": { "type": "string", "description": "Product status", "enum": [ "active", "archived" ], "example": "active" }, "price": { "type": "number", "description": "Product price", "example": 99.99 }, "currency": { "type": "string", "description": "ISO 4217 currency code", "example": "USD" }, "thumbnailUrl": { "type": "string", "format": "uri", "description": "URL to the product thumbnail image", "example": "https://example.com/images/headphones-thumb.jpg" }, "thumbnailMode": { "type": "string", "description": "How the thumbnail should be displayed", "enum": [ "fit", "fill" ], "example": "fit" }, "importSource": { "type": "string", "description": "How the product was imported", "enum": [ "manual", "csv" ], "example": "manual" }, "createdBy": { "type": "string", "description": "User ID who created the product", "example": "user-xyz789" }, "updatedBy": { "type": "string", "description": "User ID who last updated the product", "example": "user-xyz789" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the product was created", "example": "2024-01-15T10:30:00.000Z" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the product was last updated", "example": "2024-01-15T10:30:00.000Z" }, "isDeleted": { "type": "boolean", "description": "Whether the product is deleted", "example": false } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Query products", "tags": [ "Product" ], "security": [ { "BearerAuth": [] } ], "description": "Query products with optional filters.\n\n**Access Control:**\n- All authenticated users can query products\n\n**Filtering:**\n- Filter by active status\n- Filter by deleted status\n- Sort by createdAt, updatedAt, or productName\n", "parameters": [ { "name": "isActive", "in": "query", "required": false, "description": "Filter by active status", "schema": { "type": "boolean" } }, { "name": "isDeleted", "in": "query", "required": false, "description": "Filter by deleted status", "schema": { "type": "boolean" } }, { "name": "sortBy", "in": "query", "required": false, "description": "Field to sort by", "schema": { "type": "string", "enum": [ "createdAt", "updatedAt", "productName" ] } }, { "name": "sortOrder", "in": "query", "required": false, "description": "Sort order", "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "name": "options[limit]", "in": "query", "required": false, "description": "Maximum number of items to return (1-100)", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 } }, { "name": "options[token]", "in": "query", "required": false, "description": "Pagination token for fetching next page", "schema": { "type": "string", "maxLength": 1000 } } ], "responses": { "200": { "description": "Successful response with list of products", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal MongoDB ID", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "productId": { "type": "string", "description": "Unique identifier for the product", "example": "prod-12345" }, "networkId": { "type": "string", "description": "Network ID the product belongs to", "example": "network-abc123" }, "productName": { "type": "string", "description": "Name of the product", "example": "Premium Headphones" }, "productUrl": { "type": "string", "format": "uri", "description": "URL to the product page", "example": "https://example.com/products/premium-headphones" }, "status": { "type": "string", "description": "Product status", "enum": [ "active", "archived" ], "example": "active" }, "price": { "type": "number", "description": "Product price", "example": 99.99 }, "currency": { "type": "string", "description": "ISO 4217 currency code", "example": "USD" }, "thumbnailUrl": { "type": "string", "format": "uri", "description": "URL to the product thumbnail image", "example": "https://example.com/images/headphones-thumb.jpg" }, "thumbnailMode": { "type": "string", "description": "How the thumbnail should be displayed", "enum": [ "fit", "fill" ], "example": "fit" }, "importSource": { "type": "string", "description": "How the product was imported", "enum": [ "manual", "csv" ], "example": "manual" }, "createdBy": { "type": "string", "description": "User ID who created the product", "example": "user-xyz789" }, "updatedBy": { "type": "string", "description": "User ID who last updated the product", "example": "user-xyz789" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the product was created", "example": "2024-01-15T10:30:00.000Z" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the product was last updated", "example": "2024-01-15T10:30:00.000Z" }, "isDeleted": { "type": "boolean", "description": "Whether the product is deleted", "example": false } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string", "description": "Token for fetching the next page" }, "previous": { "type": "string", "description": "Token for fetching the previous page" } } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Delete products (bulk)", "tags": [ "Product" ], "security": [ { "BearerAuth": [] } ], "description": "Delete multiple products from the catalogue in a single request.\n\n**Access Control:**\n- Requires admin permissions with ManageProducts flag\n\n**Important Notes:**\n- This performs a soft delete (marks as deleted)\n- Accepts 1-100 product IDs per request\n- Product feature must be enabled in network settings\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "productIds" ], "properties": { "productIds": { "type": "array", "description": "Array of product IDs to delete", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 100 }, "example": [ "prod-12345", "prod-67890", "prod-11111" ] } } } } } }, "responses": { "200": { "description": "Successful response after deleting a product", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "success": { "type": "boolean", "example": true } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/products/{productId}": { "get": { "summary": "Get product by ID", "tags": [ "Product" ], "security": [ { "BearerAuth": [] } ], "description": "Retrieve a single product by its product ID.\n\n**Access Control:**\n- All authenticated users can view products\n", "parameters": [ { "name": "productId", "in": "path", "required": true, "description": "The unique identifier of the product", "schema": { "type": "string", "minLength": 1, "maxLength": 100 } } ], "responses": { "200": { "description": "Successful response with product data", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal MongoDB ID", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "productId": { "type": "string", "description": "Unique identifier for the product", "example": "prod-12345" }, "networkId": { "type": "string", "description": "Network ID the product belongs to", "example": "network-abc123" }, "productName": { "type": "string", "description": "Name of the product", "example": "Premium Headphones" }, "productUrl": { "type": "string", "format": "uri", "description": "URL to the product page", "example": "https://example.com/products/premium-headphones" }, "status": { "type": "string", "description": "Product status", "enum": [ "active", "archived" ], "example": "active" }, "price": { "type": "number", "description": "Product price", "example": 99.99 }, "currency": { "type": "string", "description": "ISO 4217 currency code", "example": "USD" }, "thumbnailUrl": { "type": "string", "format": "uri", "description": "URL to the product thumbnail image", "example": "https://example.com/images/headphones-thumb.jpg" }, "thumbnailMode": { "type": "string", "description": "How the thumbnail should be displayed", "enum": [ "fit", "fill" ], "example": "fit" }, "importSource": { "type": "string", "description": "How the product was imported", "enum": [ "manual", "csv" ], "example": "manual" }, "createdBy": { "type": "string", "description": "User ID who created the product", "example": "user-xyz789" }, "updatedBy": { "type": "string", "description": "User ID who last updated the product", "example": "user-xyz789" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the product was created", "example": "2024-01-15T10:30:00.000Z" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the product was last updated", "example": "2024-01-15T10:30:00.000Z" }, "isDeleted": { "type": "boolean", "description": "Whether the product is deleted", "example": false } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "Update product", "tags": [ "Product" ], "security": [ { "BearerAuth": [] } ], "description": "Update an existing product.\n\n**Access Control:**\n- Requires admin permissions with ManageProducts flag\n\n**Important Notes:**\n- Only provided fields will be updated\n- Product ID cannot be changed\n", "parameters": [ { "name": "productId", "in": "path", "required": true, "description": "The unique identifier of the product", "schema": { "type": "string", "minLength": 1, "maxLength": 100 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "productName": { "type": "string", "description": "Name of the product", "minLength": 1, "maxLength": 200, "example": "Premium Wireless Headphones" }, "productUrl": { "type": "string", "format": "uri", "description": "URL to the product page", "example": "https://example.com/products/premium-wireless-headphones" }, "status": { "type": "string", "description": "Product status", "enum": [ "active", "archived" ], "example": "active" }, "price": { "type": "number", "description": "Product price (must be positive)", "minimum": 0, "exclusiveMinimum": true, "example": 149.99 }, "currency": { "type": "string", "description": "ISO 4217 currency code (3 characters)", "minLength": 3, "maxLength": 3, "example": "USD" }, "thumbnailUrl": { "type": "string", "format": "uri", "description": "URL to the product thumbnail image", "example": "https://example.com/images/headphones-new-thumb.jpg" }, "thumbnailMode": { "type": "string", "description": "How the thumbnail should be displayed", "enum": [ "fit", "fill" ], "example": "fill" } } } } } }, "responses": { "200": { "description": "Successful response with product data", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal MongoDB ID", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "productId": { "type": "string", "description": "Unique identifier for the product", "example": "prod-12345" }, "networkId": { "type": "string", "description": "Network ID the product belongs to", "example": "network-abc123" }, "productName": { "type": "string", "description": "Name of the product", "example": "Premium Headphones" }, "productUrl": { "type": "string", "format": "uri", "description": "URL to the product page", "example": "https://example.com/products/premium-headphones" }, "status": { "type": "string", "description": "Product status", "enum": [ "active", "archived" ], "example": "active" }, "price": { "type": "number", "description": "Product price", "example": 99.99 }, "currency": { "type": "string", "description": "ISO 4217 currency code", "example": "USD" }, "thumbnailUrl": { "type": "string", "format": "uri", "description": "URL to the product thumbnail image", "example": "https://example.com/images/headphones-thumb.jpg" }, "thumbnailMode": { "type": "string", "description": "How the thumbnail should be displayed", "enum": [ "fit", "fill" ], "example": "fit" }, "importSource": { "type": "string", "description": "How the product was imported", "enum": [ "manual", "csv" ], "example": "manual" }, "createdBy": { "type": "string", "description": "User ID who created the product", "example": "user-xyz789" }, "updatedBy": { "type": "string", "description": "User ID who last updated the product", "example": "user-xyz789" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the product was created", "example": "2024-01-15T10:30:00.000Z" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the product was last updated", "example": "2024-01-15T10:30:00.000Z" }, "isDeleted": { "type": "boolean", "description": "Whether the product is deleted", "example": false } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/products/search": { "get": { "summary": "Search products", "tags": [ "Product" ], "security": [ { "BearerAuth": [] } ], "description": "Search products by keyword with optional filters.\n\n**Access Control:**\n- All authenticated users can search products\n\n**Search Features:**\n- Full-text search on product name\n- Filter by active/deleted status\n- Sortable results\n", "parameters": [ { "name": "keyword", "in": "query", "required": false, "description": "Search keyword for product name", "schema": { "type": "string", "maxLength": 200 } }, { "name": "isActive", "in": "query", "required": false, "description": "Filter by active status", "schema": { "type": "boolean" } }, { "name": "isDeleted", "in": "query", "required": false, "description": "Filter by deleted status", "schema": { "type": "boolean" } }, { "name": "sortBy", "in": "query", "required": false, "description": "Field to sort by", "schema": { "type": "string", "enum": [ "createdAt", "updatedAt", "productName" ] } }, { "name": "sortOrder", "in": "query", "required": false, "description": "Sort order", "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "name": "options[limit]", "in": "query", "required": false, "description": "Maximum number of items to return (1-100)", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 } }, { "name": "options[token]", "in": "query", "required": false, "description": "Pagination token for fetching next page", "schema": { "type": "string", "maxLength": 1000 } } ], "responses": { "200": { "description": "Successful response with list of products", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal MongoDB ID", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "productId": { "type": "string", "description": "Unique identifier for the product", "example": "prod-12345" }, "networkId": { "type": "string", "description": "Network ID the product belongs to", "example": "network-abc123" }, "productName": { "type": "string", "description": "Name of the product", "example": "Premium Headphones" }, "productUrl": { "type": "string", "format": "uri", "description": "URL to the product page", "example": "https://example.com/products/premium-headphones" }, "status": { "type": "string", "description": "Product status", "enum": [ "active", "archived" ], "example": "active" }, "price": { "type": "number", "description": "Product price", "example": 99.99 }, "currency": { "type": "string", "description": "ISO 4217 currency code", "example": "USD" }, "thumbnailUrl": { "type": "string", "format": "uri", "description": "URL to the product thumbnail image", "example": "https://example.com/images/headphones-thumb.jpg" }, "thumbnailMode": { "type": "string", "description": "How the thumbnail should be displayed", "enum": [ "fit", "fill" ], "example": "fit" }, "importSource": { "type": "string", "description": "How the product was imported", "enum": [ "manual", "csv" ], "example": "manual" }, "createdBy": { "type": "string", "description": "User ID who created the product", "example": "user-xyz789" }, "updatedBy": { "type": "string", "description": "User ID who last updated the product", "example": "user-xyz789" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the product was created", "example": "2024-01-15T10:30:00.000Z" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the product was last updated", "example": "2024-01-15T10:30:00.000Z" }, "isDeleted": { "type": "boolean", "description": "Whether the product is deleted", "example": false } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string", "description": "Token for fetching the next page" }, "previous": { "type": "string", "description": "Token for fetching the previous page" } } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/products/count": { "get": { "summary": "Count products", "tags": [ "Product" ], "security": [ { "BearerAuth": [] } ], "description": "Get the total count of products matching the specified criteria.\n\n**Access Control:**\n- Requires admin permissions\n\n**Important Notes:**\n- Counts can be filtered by keyword, active status, and deleted status\n- Product feature must be enabled in network settings\n", "parameters": [ { "name": "keyword", "in": "query", "required": false, "description": "Search keyword for product name", "schema": { "type": "string", "maxLength": 200 } }, { "name": "isActive", "in": "query", "required": false, "description": "Filter by active status", "schema": { "type": "boolean" } }, { "name": "isDeleted", "in": "query", "required": false, "description": "Filter by deleted status", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Successful response with product count", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "count": { "type": "integer", "description": "Number of products matching the criteria", "example": 42 } } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/products/list": { "get": { "summary": "Get products by IDs", "tags": [ "Product" ], "security": [ { "BearerAuth": [] } ], "description": "Retrieve multiple products by their product IDs.\n\n**Access Control:**\n- All authenticated users can retrieve products\n\n**Important Notes:**\n- Accepts 1-100 product IDs per request\n- Returns products in the same order as the input IDs\n- Product feature must be enabled in network settings\n", "parameters": [ { "name": "productIds", "in": "query", "required": true, "description": "Array of product IDs to retrieve (1-100 items)", "schema": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 100 } }, "style": "form", "explode": false } ], "responses": { "200": { "description": "Successful response with list of products by IDs", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal MongoDB ID", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "productId": { "type": "string", "description": "Unique identifier for the product", "example": "prod-12345" }, "networkId": { "type": "string", "description": "Network ID the product belongs to", "example": "network-abc123" }, "productName": { "type": "string", "description": "Name of the product", "example": "Premium Headphones" }, "productUrl": { "type": "string", "format": "uri", "description": "URL to the product page", "example": "https://example.com/products/premium-headphones" }, "status": { "type": "string", "description": "Product status", "enum": [ "active", "archived" ], "example": "active" }, "price": { "type": "number", "description": "Product price", "example": 99.99 }, "currency": { "type": "string", "description": "ISO 4217 currency code", "example": "USD" }, "thumbnailUrl": { "type": "string", "format": "uri", "description": "URL to the product thumbnail image", "example": "https://example.com/images/headphones-thumb.jpg" }, "thumbnailMode": { "type": "string", "description": "How the thumbnail should be displayed", "enum": [ "fit", "fill" ], "example": "fit" }, "importSource": { "type": "string", "description": "How the product was imported", "enum": [ "manual", "csv" ], "example": "manual" }, "createdBy": { "type": "string", "description": "User ID who created the product", "example": "user-xyz789" }, "updatedBy": { "type": "string", "description": "User ID who last updated the product", "example": "user-xyz789" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the product was created", "example": "2024-01-15T10:30:00.000Z" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the product was last updated", "example": "2024-01-15T10:30:00.000Z" }, "isDeleted": { "type": "boolean", "description": "Whether the product is deleted", "example": false } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/products/bulk/sample": { "get": { "summary": "Download bulk import sample CSV", "tags": [ "Product" ], "security": [ { "BearerAuth": [] } ], "description": "Download a sample CSV file template for bulk product import.\n\n**Access Control:**\n- Requires admin permissions\n\n**Important Notes:**\n- Returns a 302 redirect to the sample CSV file\n- Use this template to properly format your bulk import data\n- Product feature must be enabled in network settings\n", "responses": { "302": { "description": "Redirect to sample CSV file download URL", "headers": { "Location": { "schema": { "type": "string", "format": "uri" }, "description": "URL to download the sample CSV file" } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/products/bulk/jobs": { "post": { "summary": "Create bulk product import job", "tags": [ "Product" ], "security": [ { "BearerAuth": [] } ], "description": "Create a new bulk job to import products from a CSV file.\n\n**Access Control:**\n- Requires admin permissions with ManageProducts flag\n\n**Important Notes:**\n- CSV file must be uploaded first using the file upload API\n- Job will be created in 'pending' status\n- Use the start endpoint to begin processing\n- Job expires in 3 days if not started\n- Product feature must be enabled in network settings\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "fileId" ], "properties": { "fileId": { "type": "string", "description": "ID of the uploaded CSV file containing product data", "maxLength": 100, "example": "file-abc123xyz" } } } } } }, "responses": { "200": { "description": "Successful response after creating a bulk job", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal MongoDB ID", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "jobId": { "type": "string", "description": "Unique identifier for the bulk job (same as _id)", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "networkId": { "type": "string", "description": "Network ID the job belongs to", "example": "network-abc123" }, "userId": { "type": "string", "description": "User ID of the admin who initiated the job", "example": "user-xyz789" }, "fileId": { "type": "string", "description": "ID of the uploaded CSV file", "example": "file-123456" }, "status": { "type": "string", "description": "Current status of the bulk job", "enum": [ "pending", "running", "done" ], "example": "pending" }, "entityType": { "type": "string", "description": "Type of entity being processed", "enum": [ "product" ], "example": "product" }, "operation": { "type": "string", "description": "Operation to perform on the entities", "enum": [ "insert", "update" ], "example": "insert" }, "summary": { "type": "object", "description": "Summary of bulk job processing results", "properties": { "totalRows": { "type": "integer", "description": "Total number of rows in the CSV file", "example": 100 }, "processedRows": { "type": "integer", "description": "Number of rows processed so far", "example": 100 }, "successfulRows": { "type": "integer", "description": "Number of rows processed successfully", "example": 95 }, "failedRows": { "type": "integer", "description": "Number of rows that failed processing", "example": 5 }, "errorReportFileId": { "type": "string", "description": "File ID of the error report (if any failures occurred)", "example": "file-error-report-123" }, "metadata": { "type": "object", "description": "Additional metadata about the job", "additionalProperties": true }, "processingStartedAt": { "type": "string", "format": "date-time", "description": "Timestamp when processing started", "example": "2024-01-15T10:30:30.000Z" }, "processingCompletedAt": { "type": "string", "format": "date-time", "description": "Timestamp when processing completed", "example": "2024-01-15T10:35:30.000Z" }, "processingDurationMs": { "type": "integer", "description": "Duration of processing in milliseconds", "example": 300000 } } }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job was created", "example": "2024-01-15T10:30:00.000Z" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job was last updated", "example": "2024-01-15T10:35:00.000Z" }, "expiredAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job will expire (for pending jobs)", "example": "2024-01-18T10:30:00.000Z" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Query bulk product import jobs", "tags": [ "Product" ], "security": [ { "BearerAuth": [] } ], "description": "Query bulk import jobs with optional filters and pagination.\n\n**Access Control:**\n- Requires admin permissions\n\n**Filtering:**\n- Filter by job status (pending, running, done)\n- Sort by createdAt or updatedAt\n- Paginated results\n\n**Important Notes:**\n- Product feature must be enabled in network settings\n", "parameters": [ { "name": "status", "in": "query", "required": false, "description": "Filter bulk jobs by status (can specify multiple)", "schema": { "type": "array", "minItems": 1, "maxItems": 3, "items": { "type": "string", "enum": [ "pending", "running", "done" ] } }, "style": "form", "explode": false }, { "name": "sortBy", "in": "query", "required": false, "description": "Field to sort by", "schema": { "type": "string", "enum": [ "createdAt", "updatedAt", "productName" ] } }, { "name": "sortOrder", "in": "query", "required": false, "description": "Sort order", "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "name": "options[limit]", "in": "query", "required": false, "description": "Maximum number of items to return (1-100)", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 } }, { "name": "options[token]", "in": "query", "required": false, "description": "Pagination token for fetching next page", "schema": { "type": "string", "maxLength": 1000 } } ], "responses": { "200": { "description": "Successful response with list of bulk jobs", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal MongoDB ID", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "jobId": { "type": "string", "description": "Unique identifier for the bulk job (same as _id)", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "networkId": { "type": "string", "description": "Network ID the job belongs to", "example": "network-abc123" }, "userId": { "type": "string", "description": "User ID of the admin who initiated the job", "example": "user-xyz789" }, "fileId": { "type": "string", "description": "ID of the uploaded CSV file", "example": "file-123456" }, "status": { "type": "string", "description": "Current status of the bulk job", "enum": [ "pending", "running", "done" ], "example": "pending" }, "entityType": { "type": "string", "description": "Type of entity being processed", "enum": [ "product" ], "example": "product" }, "operation": { "type": "string", "description": "Operation to perform on the entities", "enum": [ "insert", "update" ], "example": "insert" }, "summary": { "type": "object", "description": "Summary of bulk job processing results", "properties": { "totalRows": { "type": "integer", "description": "Total number of rows in the CSV file", "example": 100 }, "processedRows": { "type": "integer", "description": "Number of rows processed so far", "example": 100 }, "successfulRows": { "type": "integer", "description": "Number of rows processed successfully", "example": 95 }, "failedRows": { "type": "integer", "description": "Number of rows that failed processing", "example": 5 }, "errorReportFileId": { "type": "string", "description": "File ID of the error report (if any failures occurred)", "example": "file-error-report-123" }, "metadata": { "type": "object", "description": "Additional metadata about the job", "additionalProperties": true }, "processingStartedAt": { "type": "string", "format": "date-time", "description": "Timestamp when processing started", "example": "2024-01-15T10:30:30.000Z" }, "processingCompletedAt": { "type": "string", "format": "date-time", "description": "Timestamp when processing completed", "example": "2024-01-15T10:35:30.000Z" }, "processingDurationMs": { "type": "integer", "description": "Duration of processing in milliseconds", "example": 300000 } } }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job was created", "example": "2024-01-15T10:30:00.000Z" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job was last updated", "example": "2024-01-15T10:35:00.000Z" }, "expiredAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job will expire (for pending jobs)", "example": "2024-01-18T10:30:00.000Z" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string", "description": "Token for fetching the next page" }, "previous": { "type": "string", "description": "Token for fetching the previous page" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/products/bulk/jobs/{jobId}": { "post": { "summary": "Start bulk product import job", "tags": [ "Product" ], "security": [ { "BearerAuth": [] } ], "description": "Start processing a pending bulk import job.\n\n**Access Control:**\n- Requires admin permissions with ManageProducts flag\n\n**Important Notes:**\n- Job must be in 'pending' status\n- Job status will change to 'running' once started\n- Processing happens asynchronously via background workers\n- Check job status and summary for progress updates\n- Product feature must be enabled in network settings\n", "parameters": [ { "name": "jobId", "in": "path", "required": true, "description": "The unique identifier of the bulk job", "schema": { "type": "string", "minLength": 24, "maxLength": 24, "pattern": "^[0-9a-fA-F]{24}$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "operation" ], "properties": { "operation": { "type": "string", "description": "Operation to perform on the products in the CSV file", "enum": [ "insert", "update" ], "example": "insert" } } } } } }, "responses": { "200": { "description": "Successful response with bulk job details", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal MongoDB ID", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "jobId": { "type": "string", "description": "Unique identifier for the bulk job (same as _id)", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "networkId": { "type": "string", "description": "Network ID the job belongs to", "example": "network-abc123" }, "userId": { "type": "string", "description": "User ID of the admin who initiated the job", "example": "user-xyz789" }, "fileId": { "type": "string", "description": "ID of the uploaded CSV file", "example": "file-123456" }, "status": { "type": "string", "description": "Current status of the bulk job", "enum": [ "pending", "running", "done" ], "example": "pending" }, "entityType": { "type": "string", "description": "Type of entity being processed", "enum": [ "product" ], "example": "product" }, "operation": { "type": "string", "description": "Operation to perform on the entities", "enum": [ "insert", "update" ], "example": "insert" }, "summary": { "type": "object", "description": "Summary of bulk job processing results", "properties": { "totalRows": { "type": "integer", "description": "Total number of rows in the CSV file", "example": 100 }, "processedRows": { "type": "integer", "description": "Number of rows processed so far", "example": 100 }, "successfulRows": { "type": "integer", "description": "Number of rows processed successfully", "example": 95 }, "failedRows": { "type": "integer", "description": "Number of rows that failed processing", "example": 5 }, "errorReportFileId": { "type": "string", "description": "File ID of the error report (if any failures occurred)", "example": "file-error-report-123" }, "metadata": { "type": "object", "description": "Additional metadata about the job", "additionalProperties": true }, "processingStartedAt": { "type": "string", "format": "date-time", "description": "Timestamp when processing started", "example": "2024-01-15T10:30:30.000Z" }, "processingCompletedAt": { "type": "string", "format": "date-time", "description": "Timestamp when processing completed", "example": "2024-01-15T10:35:30.000Z" }, "processingDurationMs": { "type": "integer", "description": "Duration of processing in milliseconds", "example": 300000 } } }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job was created", "example": "2024-01-15T10:30:00.000Z" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job was last updated", "example": "2024-01-15T10:35:00.000Z" }, "expiredAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job will expire (for pending jobs)", "example": "2024-01-18T10:30:00.000Z" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Get bulk product import job by ID", "tags": [ "Product" ], "security": [ { "BearerAuth": [] } ], "description": "Retrieve details of a specific bulk import job.\n\n**Access Control:**\n- Requires admin permissions\n\n**Important Notes:**\n- Returns complete job details including processing summary\n- Check summary.errorReportFileId for error details if job had failures\n- Product feature must be enabled in network settings\n", "parameters": [ { "name": "jobId", "in": "path", "required": true, "description": "The unique identifier of the bulk job", "schema": { "type": "string", "minLength": 24, "maxLength": 24, "pattern": "^[0-9a-fA-F]{24}$" } } ], "responses": { "200": { "description": "Successful response with bulk job details", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal MongoDB ID", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "jobId": { "type": "string", "description": "Unique identifier for the bulk job (same as _id)", "example": "64a1b2c3d4e5f6g7h8i9j0k1" }, "networkId": { "type": "string", "description": "Network ID the job belongs to", "example": "network-abc123" }, "userId": { "type": "string", "description": "User ID of the admin who initiated the job", "example": "user-xyz789" }, "fileId": { "type": "string", "description": "ID of the uploaded CSV file", "example": "file-123456" }, "status": { "type": "string", "description": "Current status of the bulk job", "enum": [ "pending", "running", "done" ], "example": "pending" }, "entityType": { "type": "string", "description": "Type of entity being processed", "enum": [ "product" ], "example": "product" }, "operation": { "type": "string", "description": "Operation to perform on the entities", "enum": [ "insert", "update" ], "example": "insert" }, "summary": { "type": "object", "description": "Summary of bulk job processing results", "properties": { "totalRows": { "type": "integer", "description": "Total number of rows in the CSV file", "example": 100 }, "processedRows": { "type": "integer", "description": "Number of rows processed so far", "example": 100 }, "successfulRows": { "type": "integer", "description": "Number of rows processed successfully", "example": 95 }, "failedRows": { "type": "integer", "description": "Number of rows that failed processing", "example": 5 }, "errorReportFileId": { "type": "string", "description": "File ID of the error report (if any failures occurred)", "example": "file-error-report-123" }, "metadata": { "type": "object", "description": "Additional metadata about the job", "additionalProperties": true }, "processingStartedAt": { "type": "string", "format": "date-time", "description": "Timestamp when processing started", "example": "2024-01-15T10:30:30.000Z" }, "processingCompletedAt": { "type": "string", "format": "date-time", "description": "Timestamp when processing completed", "example": "2024-01-15T10:35:30.000Z" }, "processingDurationMs": { "type": "integer", "description": "Duration of processing in milliseconds", "example": 300000 } } }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job was created", "example": "2024-01-15T10:30:00.000Z" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job was last updated", "example": "2024-01-15T10:35:00.000Z" }, "expiredAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job will expire (for pending jobs)", "example": "2024-01-18T10:30:00.000Z" } } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/me/following-feeds": { "get": { "summary": "Get following feeds", "description": "Get posts from your wall, people you follow and communities you join", "tags": [ "Feed" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "sortBy", "in": "query", "required": false, "description": "Sort by option\n * customRanking: Sort by custom ranking\n * lastCreated: Sort by last created\n", "schema": { "type": "string", "enum": [ "lastCreated", "customRanking" ], "default": "customRanking" } }, { "name": "limit", "in": "query", "required": false, "description": "Limit the number of posts returned\n", "schema": { "type": "integer", "default": 10, "minimum": 1, "maximum": 100 } }, { "name": "token", "in": "query", "required": false, "description": "Token for pagination\n", "schema": { "type": "string", "maxLength": 100 } } ], "responses": { "200": { "description": "Following feed Information", "content": { "application/json": { "schema": { "description": "Following feed Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "422": { "description": "Parameters validation error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/content-feeds": { "get": { "summary": "Get list of contents.", "tags": [ "Feed" ], "security": [ { "BearerAuth": [] } ], "description": "Get paginable list of contents.\n", "parameters": [ { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "firstCreated", "lastCreated", "lastUpdated", "firstUpdated" ], "default": "lastCreated" } }, { "name": "hasFlag", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "hasFlag:\n * `null(default)` - Show all contents.\n * `true` - Show only flagged content or has flagged comment.\n * `false` - Show only no flagged content and has no flagged comment.\n" }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 }, "token": { "type": "string", "maxLength": 1000 } } } } ], "responses": { "200": { "description": "Content Feed Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/community-feeds/{communityId}": { "get": { "summary": "Get list of posts.", "deprecated": true, "tags": [ "Feed" ], "security": [ { "BearerAuth": [] } ], "description": "Get paginable list of posts.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "firstCreated", "lastCreated", "lastUpdated", "firstUpdated" ], "default": "lastCreated" } }, { "name": "hasFlag", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "hasFlag:\n * `null(default)` - Show all posts.\n * `true` - Show only flagged post(or children) or has flagged comment.\n * `false` - Show only no flagged post(and children) and has no flagged comment.\n" }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 }, "token": { "type": "string", "maxLength": 1000 } } } }, { "name": "dataTypes", "in": "query", "schema": { "type": "array", "minItems": 1, "maxItems": 4, "items": { "type": "string", "enum": [ "video", "image", "file", "liveStream" ] }, "description": "post data type to filter" } } ], "responses": { "200": { "description": "CommunityFeed Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400100, "message": "Unauthorized" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/global-feeds": { "get": { "summary": "Get global feed.", "tags": [ "Feed" ], "security": [ { "BearerAuth": [] } ], "description": "Get paginable list of active posts (not deleted) from users and community.\n", "parameters": [ { "name": "showOnlyMyFeed", "in": "query", "schema": { "type": "boolean" } }, { "name": "dataTypes", "in": "query", "schema": { "type": "array", "minItems": 1, "maxItems": 4, "items": { "type": "string", "enum": [ "video", "image", "file", "liveStream" ] }, "description": "post data type to filter" } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 }, "token": { "type": "string", "maxLength": 1000 } } } } ], "responses": { "200": { "description": "Global Feed Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/user-feeds/{userId}": { "get": { "summary": "Get list of posts.", "deprecated": true, "tags": [ "Feed" ], "security": [ { "BearerAuth": [] } ], "description": "Get paginable list of posts.\n", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "firstCreated", "lastCreated", "lastUpdated", "firstUpdated" ], "default": "lastCreated" } }, { "name": "hasFlag", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "hasFlag:\n * `null(default)` - Show all posts.\n * `true` - Show only flagged post(or children) or has flagged comment.\n * `false` - Show only no flagged post(and children) and has no flagged comment.\n" }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 }, "token": { "type": "string", "maxLength": 1000 } } } }, { "name": "dataTypes", "in": "query", "schema": { "type": "array", "minItems": 1, "maxItems": 4, "items": { "type": "string", "enum": [ "video", "image", "file", "liveStream" ] }, "description": "post data type to filter" } } ], "responses": { "200": { "description": "UserFeed Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/user-feeds/{userId}/count": { "get": { "summary": "Get number of post.", "tags": [ "Feed" ], "security": [ { "BearerAuth": [] } ], "description": "Get number of post.\n", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null } } ], "responses": { "200": { "description": "Number of post information", "content": { "application/json": { "schema": { "type": "object", "properties": { "postsCount": { "type": "number" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/user-feeds/{userId}": { "get": { "summary": "Query user feed v4", "tags": [ "Feed" ], "security": [ { "BearerAuth": [] } ], "description": "Query posts in user feed.\n", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "lastCreated", "firstCreated", "lastUpdated", "firstUpdated" ], "default": "lastCreated" }, "description": "Sort order for posts." }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "Filter by deleted status" }, { "name": "dataTypes", "in": "query", "schema": { "type": "array", "minItems": 1, "maxItems": 6, "items": { "type": "string", "maxLength": 100, "enum": [ "video", "image", "file", "liveStream", "poll", "clip", "text" ] } }, "description": "Post data type to filter (include child posts too)." }, { "name": "matchingOnlyParentPost", "in": "query", "schema": { "type": "boolean", "default": true }, "description": "An option to filter only parent post. If `true` will return only parent post, else will return both parent and child posts\n" }, { "name": "includePostedFeed", "in": "query", "schema": { "type": "array", "items": { "type": "string", "enum": [ "user", "community" ] }, "default": [ "user" ] }, "description": "An option to include posted feed. If `user` will return posted in user feed, if `community` will return posted in community feed.\nIf both are included, will return both user and community posted feed.\nDefault is `user` only.\n" }, { "name": "options[limit]", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10, "example": "options[limit]=5", "description": "Page size" } }, { "name": "options[after]", "in": "query", "schema": { "type": "string", "maxLength": 24, "description": "Cursor value to get records after" } }, { "name": "options[before]", "in": "query", "schema": { "type": "string", "maxLength": 24, "description": "Cursor value to get records before" } }, { "name": "options[updatedAt]", "in": "query", "schema": { "type": "string", "maxLength": 30, "description": "Use updatedAt when sorting by first or last updated" } }, { "name": "options[token]", "in": "query", "schema": { "type": "string", "maxLength": 1000, "example": "options[token]=eyJza2lwIjoyMCwibGlABDFRffewfQ==", "description": "Pagination token" } }, { "name": "includeMixedStructure", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "An option to include mixed structure posts (posts that have different data types in parent and child posts).\n" } ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream", "clip" ], "description": "Type of a post (ex. text, image, file, video, clip or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "description": "Body of a post. Can be different types based on content type.", "oneOf": [ { "type": "object", "title": "normal post", "description": "Standard post data (text, image, file, video)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, { "type": "object", "title": "clip post", "description": "clip post data", "properties": { "fileId": { "type": "string", "description": "file key on cloud storage." }, "thumbnailId": { "type": "string", "description": "thumbnail file id." }, "isMuted": { "type": "boolean", "description": "whether the video is muted.", "default": false }, "displayMode": { "type": "string", "description": "display mode for the video.", "enum": [ "fill", "fit" ], "default": "fill" } } } ] }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "video_content" }, "example": [ "video_content", "clips_feature", "multimedia_posts", "next_gen_social" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "mobile_app" }, "example": [ "mobile_app", "user_experience", "API_v4", "social_platform" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/me/global-feeds": { "get": { "summary": "Get global feed.", "tags": [ "Feed" ], "security": [ { "BearerAuth": [] } ], "description": "Get paginable list of active posts (not deleted) from users and community.\n", "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 } }, { "name": "token", "in": "query", "schema": { "type": "string", "minLength": 1, "maxLength": 100 } }, { "name": "dataTypes", "in": "query", "schema": { "type": "array", "minItems": 1, "maxItems": 5, "items": { "type": "string", "enum": [ "video", "image", "file", "liveStream", "clip" ] }, "description": "post data type to filter" } }, { "name": "resolveParent", "in": "query", "schema": { "type": "boolean", "description": "whether to include parent when filtering by dataTypes that only have child posts e.g. `dataTypes=['video', 'clip']`" } } ], "responses": { "200": { "description": "Global Feed Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream", "clip" ], "description": "Type of a post (ex. text, image, file, video, clip or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "description": "Body of a post. Can be different types based on content type.", "oneOf": [ { "type": "object", "title": "normal post", "description": "Standard post data (text, image, file, video)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, { "type": "object", "title": "clip post", "description": "clip post data", "properties": { "fileId": { "type": "string", "description": "file key on cloud storage." }, "thumbnailId": { "type": "string", "description": "thumbnail file id." }, "isMuted": { "type": "boolean", "description": "whether the video is muted.", "default": false }, "displayMode": { "type": "string", "description": "display mode for the video.", "enum": [ "fill", "fit" ], "default": "fill" } } } ] }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "video_content" }, "example": [ "video_content", "clips_feature", "multimedia_posts", "next_gen_social" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v5/me/global-feeds": { "get": { "summary": "Get global feed.", "tags": [ "Feed" ], "security": [ { "BearerAuth": [] } ], "description": "Get posts from your wall, people you follow and communities you join sorted by custom ranking algorithm\n", "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 } }, { "name": "token", "in": "query", "schema": { "type": "string", "minLength": 1, "maxLength": 1000 } }, { "name": "dataTypes", "in": "query", "schema": { "type": "array", "minItems": 1, "maxItems": 2, "items": { "type": "string", "enum": [ "video", "clip" ], "description": "dataTypes to specified, if we send 'video' to the API the feed will be from post with dataType=video only" }, "description": "Post `dataTypes` to filter" } }, { "name": "includeMixedStructure", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "An option to include mixed structure posts (posts that have different data types in parent and child posts)" } ], "responses": { "200": { "description": "Global Feed Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream", "clip" ], "description": "Type of a post (ex. text, image, file, video, clip or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "description": "Body of a post. Can be different types based on content type.", "oneOf": [ { "type": "object", "title": "normal post", "description": "Standard post data (text, image, file, video)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, { "type": "object", "title": "clip post", "description": "clip post data", "properties": { "fileId": { "type": "string", "description": "file key on cloud storage." }, "thumbnailId": { "type": "string", "description": "thumbnail file id." }, "isMuted": { "type": "boolean", "description": "whether the video is muted.", "default": false }, "displayMode": { "type": "string", "description": "display mode for the video.", "enum": [ "fill", "fit" ], "default": "fill" } } } ] }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "video_content" }, "example": [ "video_content", "clips_feature", "multimedia_posts", "next_gen_social" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/files": { "post": { "summary": "Upload file.", "tags": [ "File" ], "security": [ { "BearerAuth": [] } ], "description": "Upload file to cloud storage\n", "requestBody": { "description": "Information of file to be created. It will be applied to every attachment\n", "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "array", "items": { "type": "string", "format": "binary" }, "description": "An array containing a single file." }, "files": { "type": "array", "items": { "type": "string", "format": "binary" }, "description": "An array of files. Must not be provided at the same time as `file`.", "deprecated": true }, "fullImage": { "type": "boolean", "nullable": true }, "preferredFilename": { "type": "string", "maxLength": 1024 }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" } }, "required": [ "file" ] } } } }, "responses": { "200": { "description": "File Upload Result", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "413": { "description": "Attached file payload too large.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 413000, "message": "Payload too large." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/files/{fileId}": { "get": { "summary": "Get file info", "security": [ { "BearerAuth": [] } ], "tags": [ "File" ], "description": "Get file info of fileId (ex. type, attributes)\n", "parameters": [ { "in": "path", "name": "fileId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "File id" } ], "responses": { "200": { "description": "File Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "url to download the file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file." }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, "400": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } } } }, "delete": { "summary": "Delete file", "tags": [ "File" ], "security": [ { "BearerAuth": [] } ], "description": "Delete file (also remove from cloud). Only uploader and admin can remove.\n", "parameters": [ { "in": "path", "name": "fileId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "File id" } ], "responses": { "200": { "description": "File Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Removed file id." } } } } } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "Permission denied" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Put a wrong request parameters.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters error.", "data": { "detail": [ "The 'data.text' field length must be less than or equal to 20000 characters long." ] } } } } } } }, "put": { "summary": "Update file info.", "tags": [ "File" ], "security": [ { "BearerAuth": [] } ], "description": "Update file info\n", "parameters": [ { "in": "path", "name": "fileId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "File id" } ], "requestBody": { "description": "information of a file to be updated.", "content": { "application/json": { "schema": { "type": "object", "required": [ "fileId" ], "properties": { "fileId": { "type": "string", "description": "The ID of the file to be updated." }, "isUsed": { "type": "boolean", "description": "Indicates if the file is currently in use." }, "altText": { "type": "string", "description": "Alternative text for the file." }, "status": { "type": "string", "enum": [ "uploading", "done", "error", "removed" ], "description": "The status of the file." }, "videoUrl": { "type": "string", "description": "URL of the video if applicable." }, "thumbnailFileId": { "type": "string", "description": "The ID of the thumbnail file." }, "metadata": { "type": "object", "description": "Metadata associated with the file. Do not provide `isFull` key as it is reserved for internal use and this `metadata` field is limited to 5kb." } } } } } }, "responses": { "200": { "description": "File Upload Result", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Given file id is not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "File not found ${fileId}." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/files/{fileId}/download": { "get": { "summary": "Download file", "tags": [ "File" ], "security": [], "description": "Download file data", "parameters": [ { "name": "Authorization", "in": "header", "schema": { "type": "string" } }, { "name": "_ascSession", "in": "cookie", "schema": { "type": "string" }, "description": "Access token" }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "fileId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "File id" }, { "in": "query", "name": "size", "required": false, "schema": { "type": "string", "enum": [ "full", "large", "medium", "small" ] }, "description": "Size of image to download (no effect on file type 'file')" } ], "responses": { "302": { "description": "Redirect to retrieve file data", "headers": { "Location": { "description": "Signed URL to redirect to", "schema": { "type": "string" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } } } } }, "/api/v4/images": { "post": { "summary": "Upload image file.", "security": [ { "BearerAuth": [] } ], "tags": [ "File" ], "parameters": [ { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "description": "Upload image to cloud storage\n\nImage size limit: 1,073,741,824 byte\n", "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "array", "items": { "type": "string", "format": "binary" }, "description": "An array containing a single file." }, "files": { "type": "array", "items": { "type": "string", "format": "binary" }, "description": "An array of files. Must not be provided at the same time as `file`.", "deprecated": true }, "preferredFilename": { "type": "string", "maxLength": 1024 }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file. Not compatible with `files` property.", "maxLength": 180 } }, "required": [ "file" ] } } } }, "responses": { "200": { "description": "Image Upload Result", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "url to download the file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ], "example": "image" }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file." }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name.", "example": "test.jpeg" }, "extension": { "type": "string", "description": "File format.", "example": "jpeg" }, "size": { "type": "number", "description": "File size.", "example": 2107842 }, "mimeType": { "type": "string", "description": "File mime-type.", "example": "image/jpeg" }, "metadata": { "type": "object", "description": "Image metadata (width, height etc.).", "properties": { "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "413": { "description": "Attached file payload too large.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 413000, "message": "Payload too large." } } } }, "422": { "description": "Put a wrong request parameters.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters error.", "data": { "detail": [ "The 'data.text' field length must be less than or equal to 20000 characters long." ] } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/files": { "post": { "summary": "Upload file.", "security": [ { "BearerAuth": [] } ], "tags": [ "File" ], "parameters": [ { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "description": "Upload file to cloud storage\n\nFile size limit: 1,073,741,824 byte\n", "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "array", "items": { "type": "string", "format": "binary" }, "description": "An array containing a single file." }, "files": { "type": "array", "items": { "type": "string", "format": "binary" }, "description": "An array of files. Must not be provided at the same time as `file`.", "deprecated": true }, "preferredFilename": { "type": "string", "maxLength": 1024 }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" } }, "required": [ "file" ] } } } }, "responses": { "200": { "description": "File Upload Result", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "url to download the file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ], "example": "file" }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file." }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name.", "example": "test.pdf" }, "extension": { "type": "string", "description": "File format.", "example": "pdf" }, "size": { "type": "number", "description": "File size.", "example": 2107842 }, "mimeType": { "type": "string", "description": "File mime-type.", "example": "application/pdf" }, "metadata": { "type": "object", "description": "File metadata." } } } } } } } } }, "413": { "description": "Attached file payload too large.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 413000, "message": "Payload too large." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/videos": { "post": { "summary": "Upload video file.", "security": [ { "BearerAuth": [] } ], "tags": [ "File" ], "parameters": [ { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "description": "Upload video to cloud storage\n\nVideo size limit: 2,147,483,648 byte (2GB)\n", "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "array", "items": { "type": "string", "format": "binary" }, "description": "An array containing a single file." }, "files": { "type": "array", "items": { "type": "string", "format": "binary" }, "description": "An array of files. Must not be provided at the same time as `file`.", "deprecated": true }, "preferredFilename": { "type": "string", "maxLength": 1024 }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" } }, "required": [ "file" ] } } } }, "responses": { "200": { "description": "File Video Upload Result", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "url to download the file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ], "example": "video" }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file." }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name.", "example": "big_buck_bunny_720p_2mb.mp4" }, "extension": { "type": "string", "description": "File format.", "example": "mp4" }, "size": { "type": "number", "description": "File size.", "example": 2107842 }, "mimeType": { "type": "string", "description": "File mime-type.", "example": "video/mp4" }, "metadata": { "type": "object", "description": "Video metadata (width, height etc.)." } } } } } } } } }, "413": { "description": "Attached file payload too large.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 413000, "message": "Payload too large." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/clips": { "post": { "summary": "Upload clip file.", "security": [ { "BearerAuth": [] } ], "tags": [ "File" ], "parameters": [ { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "description": "Upload a clip to cloud storage \n\nVideo size limit: 2,147,483,648 byte (2GB) \n\nVideo duration limit: 15 minutes", "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "array", "items": { "type": "string", "format": "binary" }, "description": "An array containing a single file." }, "files": { "type": "array", "items": { "type": "string", "format": "binary" }, "description": "An array of files. Must not be provided at the same time as `file`.", "deprecated": true }, "preferredFilename": { "type": "string", "maxLength": 1024 }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" } }, "required": [ "file" ] } } } }, "responses": { "200": { "description": "Clip Video Upload Result", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "url to download the file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video", "clip" ], "example": "clip" }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file." }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name.", "example": "big_buck_bunny_720p_2mb.mp4" }, "extension": { "type": "string", "description": "File format.", "example": "mp4" }, "size": { "type": "number", "description": "File size.", "example": 2107842 }, "mimeType": { "type": "string", "description": "File mime-type.", "example": "video/mp4" }, "metadata": { "type": "object", "description": "Video metadata (width, height etc.)." } } } } } } } } }, "413": { "description": "Attached file payload too large.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 413000, "message": "Payload too large." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/images/from-url": { "post": { "summary": "Upload image from URL.", "security": [ { "BearerAuth": [] } ], "tags": [ "File" ], "parameters": [ { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "description": "This endpoint allows you to upload an image from a URL to Social+ cloud storage.\n\n**Note:** This feature requires enablement. Please contact social.plus support to enable this feature.\n\nFile size limit: 1,073,741,824 byte\n", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "fileUrl": { "type": "string", "description": "A file URL to upload" }, "preferredFilename": { "type": "string", "maxLength": 1024 }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 } }, "required": [ "fileUrl" ] } } } }, "responses": { "200": { "description": "Image Upload Result", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "url to download the file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ], "example": "image" }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file." }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name.", "example": "test.jpeg" }, "extension": { "type": "string", "description": "File format.", "example": "jpeg" }, "size": { "type": "number", "description": "File size.", "example": 2107842 }, "mimeType": { "type": "string", "description": "File mime-type.", "example": "image/jpeg" }, "metadata": { "type": "object", "description": "Image metadata (width, height etc.).", "properties": { "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400100, "message": "Unauthorized" } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "408": { "description": "Request Timeout error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 408000, "message": "Request Timeout" } } } }, "413": { "description": "Attached file payload too large.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 413000, "message": "Payload too large." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/videos/from-url": { "post": { "summary": "Upload video from URL.", "security": [ { "BearerAuth": [] } ], "tags": [ "File" ], "parameters": [ { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "description": "This endpoint allows you to upload an video from a URL to Social+ cloud storage.\n\n**Note:** This feature requires enablement. Please contact social.plus support to enable this feature.\n\nFile size limit: 1,073,741,824 byte\n", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "fileUrl": { "type": "string", "description": "A file URL to upload" }, "preferredFilename": { "type": "string", "maxLength": 1024 }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" } }, "required": [ "fileUrl" ] } } } }, "responses": { "200": { "description": "File Video Upload Result", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "url to download the file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ], "example": "video" }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file." }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name.", "example": "big_buck_bunny_720p_2mb.mp4" }, "extension": { "type": "string", "description": "File format.", "example": "mp4" }, "size": { "type": "number", "description": "File size.", "example": 2107842 }, "mimeType": { "type": "string", "description": "File mime-type.", "example": "video/mp4" }, "metadata": { "type": "object", "description": "Video metadata (width, height etc.)." } } } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400100, "message": "Unauthorized" } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "408": { "description": "Request Timeout error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 408000, "message": "Request Timeout" } } } }, "413": { "description": "Attached file payload too large.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 413000, "message": "Payload too large." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/files/from-url": { "post": { "summary": "Upload file from URL.", "security": [ { "BearerAuth": [] } ], "tags": [ "File" ], "parameters": [ { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "description": "This endpoint allows you to upload a file from a URL to Social+ cloud storage.\n\n**Note:** This feature requires enablement. Please contact social.plus support to enable this feature.\n\nFile size limit: 1,073,741,824 byte\n", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "fileUrl": { "type": "string", "description": "A file URL to upload" }, "preferredFilename": { "type": "string", "maxLength": 1024 }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" } }, "required": [ "fileUrl" ] } } } }, "responses": { "200": { "description": "File Upload Result", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "url to download the file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ], "example": "file" }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file." }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name.", "example": "test.pdf" }, "extension": { "type": "string", "description": "File format.", "example": "pdf" }, "size": { "type": "number", "description": "File size.", "example": 2107842 }, "mimeType": { "type": "string", "description": "File mime-type.", "example": "application/pdf" }, "metadata": { "type": "object", "description": "File metadata." } } } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400100, "message": "Unauthorized" } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "408": { "description": "Request Timeout error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 408000, "message": "Request Timeout" } } } }, "413": { "description": "Attached file payload too large.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 413000, "message": "Payload too large." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/me/following/{userId}": { "post": { "summary": "Follow user.", "tags": [ "Follow" ], "security": [ { "BearerAuth": [] } ], "description": "Follow user\n", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Follow Response Object", "content": { "application/json": { "schema": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Unfollow or Cancel follow request", "tags": [ "Follow" ], "security": [ { "BearerAuth": [] } ], "description": "Unfollow or Cancel follow request\n", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Follow Response Object", "content": { "application/json": { "schema": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/me/followers/{userId}": { "post": { "summary": "Accept follow request.", "tags": [ "Follow" ], "security": [ { "BearerAuth": [] } ], "description": "Accept follow request.\n", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Follow Response Object", "content": { "application/json": { "schema": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Decline follow request or delete followers.", "tags": [ "Follow" ], "security": [ { "BearerAuth": [] } ], "description": "Delete follower.\n", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Follow Response Object", "content": { "application/json": { "schema": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/me/followers": { "get": { "summary": "Get my follower list.", "tags": [ "Follow" ], "security": [ { "BearerAuth": [] } ], "description": "Get follower information (pagination supported)\n", "parameters": [ { "name": "status", "in": "query", "schema": { "type": "string", "enum": [ "all", "pending", "accepted" ], "default": "all" } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 } }, { "name": "token", "in": "query", "schema": { "type": "string", "minLength": 1, "maxLength": 100 } } ], "responses": { "200": { "description": "Follows List", "content": { "application/json": { "schema": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/users/{userId}/followers": { "get": { "summary": "Get other follower list.", "tags": [ "Follow" ], "security": [ { "BearerAuth": [] } ], "description": "Get follower information (pagination supported)\n", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "status", "in": "query", "schema": { "type": "string", "enum": [ "all", "pending", "accepted" ], "default": "all" } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 } }, { "name": "token", "in": "query", "schema": { "type": "string", "minLength": 1, "maxLength": 100 } } ], "responses": { "200": { "description": "Follows List", "content": { "application/json": { "schema": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/me/following": { "get": { "summary": "Get my following list", "tags": [ "Follow" ], "security": [ { "BearerAuth": [] } ], "description": "Get following information (pagination supported)\n", "parameters": [ { "name": "status", "in": "query", "schema": { "type": "string", "enum": [ "all", "pending", "accepted" ], "default": "all" } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 } }, { "name": "token", "in": "query", "schema": { "type": "string", "minLength": 1, "maxLength": 100 } } ], "responses": { "200": { "description": "Follows List", "content": { "application/json": { "schema": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/users/{userId}/following": { "get": { "summary": "Get other following list.", "tags": [ "Follow" ], "security": [ { "BearerAuth": [] } ], "description": "Get following information (pagination supported)\n", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "status", "in": "query", "schema": { "type": "string", "enum": [ "all", "pending", "accepted" ], "default": "all" } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 } }, { "name": "token", "in": "query", "schema": { "type": "string", "minLength": 1, "maxLength": 100 } } ], "responses": { "200": { "description": "Follows List", "content": { "application/json": { "schema": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/me/followInfo": { "get": { "summary": "Get my follow information.", "tags": [ "Follow" ], "security": [ { "BearerAuth": [] } ], "description": "Get my follow information.\n", "responses": { "200": { "description": "Follow Count", "content": { "application/json": { "schema": { "type": "object", "properties": { "followCounts": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "followerCount": { "type": "integer" }, "followingCount": { "type": "integer" }, "pendingCount": { "type": "integer" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/users/{userId}/followInfo": { "get": { "summary": "Get other follow information.", "tags": [ "Follow" ], "security": [ { "BearerAuth": [] } ], "description": "Get other follow information.\n", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Follow Information", "content": { "application/json": { "schema": { "type": "object", "required": [ "followCounts" ], "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "followCounts": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "followerCount": { "type": "integer" }, "followingCount": { "type": "integer" }, "pendingCount": { "type": "integer" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v5/users/{userId}/followInfo": { "get": { "summary": "Get other follow information.", "tags": [ "Follow" ], "security": [ { "BearerAuth": [] } ], "description": "Get other follow information.\n", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "Follow Information", "content": { "application/json": { "schema": { "type": "object", "required": [ "followCounts" ], "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "blocked", "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "followCounts": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "followerCount": { "type": "integer" }, "followingCount": { "type": "integer" }, "pendingCount": { "type": "integer" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/pinned-posts/global": { "get": { "summary": "Query global pinned post", "tags": [ "Global Featured Post" ], "security": [ { "BearerAuth": [] } ], "description": "Query global pinned post\n", "responses": { "200": { "description": "Pin Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "pinTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Id of target. (postId or messageFeedId or networkId )" }, "targetType": { "type": "string", "description": "type of target. (community or messageFeed or network)" }, "lastPinsUpdatedAt": { "type": "string", "description": "Latest date/time when pinned content is updated.", "format": "date-time" } } } }, "pins": { "type": "array", "items": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "Id of content. (post or messageFeed or network)" }, "referenceType": { "type": "string", "description": "type of content. (post or or messageFeed or network)" }, "placement": { "type": "string", "description": "type of pin. (default or announcement or global)" }, "pinnedBy": { "type": "string", "description": "user id who pinned the content." }, "pinnedAt": { "type": "string", "description": "The date/time when a content is pinned.", "format": "date-time" } } } }, "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Clear all global pinned post in a global feed", "tags": [ "Global Featured Post" ], "security": [ { "BearerAuth": [] } ], "description": "Clear all global pinned post in a global feed\n", "responses": { "200": { "description": "Pin Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "pinTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Id of target. (postId or messageFeedId or networkId )" }, "targetType": { "type": "string", "description": "type of target. (community or messageFeed or network)" }, "lastPinsUpdatedAt": { "type": "string", "description": "Latest date/time when pinned content is updated.", "format": "date-time" } } } }, "pins": { "type": "array", "items": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "Id of content. (post or messageFeed or network)" }, "referenceType": { "type": "string", "description": "type of content. (post or or messageFeed or network)" }, "placement": { "type": "string", "description": "type of pin. (default or announcement or global)" }, "pinnedBy": { "type": "string", "description": "user id who pinned the content." }, "pinnedAt": { "type": "string", "description": "The date/time when a content is pinned.", "format": "date-time" } } } }, "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/pinned-posts/global/{postId}": { "post": { "summary": "Global pin a post in a global feed", "tags": [ "Global Featured Post" ], "security": [ { "BearerAuth": [] } ], "description": "Global pin a post in a global feed\n", "parameters": [ { "name": "postId", "required": true, "in": "path", "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "Pin Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "pinTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Id of target. (postId or messageFeedId or networkId )" }, "targetType": { "type": "string", "description": "type of target. (community or messageFeed or network)" }, "lastPinsUpdatedAt": { "type": "string", "description": "Latest date/time when pinned content is updated.", "format": "date-time" } } } }, "pins": { "type": "array", "items": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "Id of content. (post or messageFeed or network)" }, "referenceType": { "type": "string", "description": "type of content. (post or or messageFeed or network)" }, "placement": { "type": "string", "description": "type of pin. (default or announcement or global)" }, "pinnedBy": { "type": "string", "description": "user id who pinned the content." }, "pinnedAt": { "type": "string", "description": "The date/time when a content is pinned.", "format": "date-time" } } } }, "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "badRequest Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "This post is already pinned.": { "value": { "status": "error", "code": 400000, "message": "Post ${postId} is already pinned" } }, "This post is not in community": { "value": { "status": "error", "code": 400000, "message": "Post ${postId} is not in community" } }, "This post is not in public community": { "value": { "status": "error", "code": 400000, "message": "Post ${postId} is not in public community" } }, "This post is not approved": { "value": { "status": "error", "code": 400000, "message": "Post ${postId} has to be approved" } }, "This post is deleted": { "value": { "status": "error", "code": 400000, "message": "Post ${postId} is deleted" } }, "Unable to pin child post ": { "value": { "status": "error", "code": 400000, "message": "Unable to pin child post" } }, "Pin post exceed the limit": { "value": { "status": "error", "code": 400000, "message": "Pin post by placement: ${placement} exceed the limit" } } } } } }, "403": { "description": "No permission to global pin a post in a global feed", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Admin do not have permission.": { "value": { "status": "error", "code": 400300, "message": "Insufficient permission" } } } } } }, "404": { "description": "The postId is not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "The postId is not found": { "value": { "status": "error", "code": 400400, "message": "PostId ${postId} not found" } } } } } }, "422": { "description": "Parameters validation error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Global Unpin a post in a global feed", "tags": [ "Global Featured Post" ], "security": [ { "BearerAuth": [] } ], "description": "Global Unpin a post in a global feed\n", "parameters": [ { "name": "postId", "required": true, "in": "path", "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "Pin Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "pinTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Id of target. (postId or messageFeedId or networkId )" }, "targetType": { "type": "string", "description": "type of target. (community or messageFeed or network)" }, "lastPinsUpdatedAt": { "type": "string", "description": "Latest date/time when pinned content is updated.", "format": "date-time" } } } }, "pins": { "type": "array", "items": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "Id of content. (post or messageFeed or network)" }, "referenceType": { "type": "string", "description": "type of content. (post or or messageFeed or network)" }, "placement": { "type": "string", "description": "type of pin. (default or announcement or global)" }, "pinnedBy": { "type": "string", "description": "user id who pinned the content." }, "pinnedAt": { "type": "string", "description": "The date/time when a content is pinned.", "format": "date-time" } } } }, "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "badRequest Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "This post is not pinned.": { "value": { "status": "error", "code": 400000, "message": "Post ${postId} is not pinned" } } } } } }, "403": { "description": "No permission to global pin a post in a global feed", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Admin do not have permission.": { "value": { "status": "error", "code": 400300, "message": "Insufficient permission" } } } } } }, "404": { "description": "The postId is not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "The postId is not found": { "value": { "status": "error", "code": 400400, "message": "PostId ${postId} not found" } } } } } }, "422": { "description": "Parameters validation error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/markers/channels": { "get": { "tags": [ "Marker" ], "summary": "Get marker for channels", "security": [ { "BearerAuth": [] } ], "description": "Get marker for channels", "parameters": [ { "name": "channelIds", "description": "list of channel id (internal)", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "string", "description": "list of channel id (internal)" } } } ], "responses": { "200": { "description": "Get marker channel", "content": { "application/json": { "schema": { "properties": { "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } }, "userEntityMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isDeleted": { "type": "boolean", "description": "flag to check if channel marker deleted" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "membership": { "type": "string", "description": "membership status of user in channel", "enum": [ "member", "banned", "muted", "non-member", "deleted" ] }, "createdAt": { "type": "string", "description": "The date/time when user channel markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user channel markers are updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/markers/channels/{channelId}/mark-read": { "put": { "tags": [ "Marker" ], "summary": "Mark all messages in channel as read", "security": [ { "BearerAuth": [] } ], "description": "Mark all messages in channel as read", "parameters": [ { "name": "channelId", "description": "channel id (internal)", "in": "path", "required": true, "schema": { "type": "string", "description": "channel id (internal)" } } ], "responses": { "200": { "description": "Mark all message in channel", "content": { "application/json": { "schema": { "properties": { "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } }, "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "userEntityMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isDeleted": { "type": "boolean", "description": "flag to check if channel marker deleted" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "membership": { "type": "string", "description": "membership status of user in channel", "enum": [ "member", "banned", "muted", "non-member", "deleted" ] }, "createdAt": { "type": "string", "description": "The date/time when user channel markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user channel markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/markers/message-feeds": { "get": { "tags": [ "Marker" ], "summary": "Get marker for message feeds", "security": [ { "BearerAuth": [] } ], "description": "Get marker for message feeds", "parameters": [ { "name": "messageFeedIds", "description": "list of message feed id (internal)", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "string", "description": "list of message feed id (internal)" } } } ], "responses": { "200": { "description": "Get marker message feed", "content": { "application/json": { "schema": { "properties": { "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } }, "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "userEntityMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isDeleted": { "type": "boolean", "description": "flag to check if channel marker deleted" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "membership": { "type": "string", "description": "membership status of user in channel", "enum": [ "member", "banned", "muted", "non-member", "deleted" ] }, "createdAt": { "type": "string", "description": "The date/time when user channel markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user channel markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/markers/message-feeds/{messageFeedId}/mark-delivering": { "put": { "tags": [ "Marker" ], "summary": "Mark message feeds as delivering", "security": [ { "BearerAuth": [] } ], "description": "Mark message feeds as delivering", "parameters": [ { "name": "messageFeedId", "description": "message feed id (internal)", "in": "path", "required": true, "schema": { "type": "string", "description": "message feed id (internal)" } } ], "requestBody": { "description": "Mark delivering", "content": { "application/json": { "schema": { "type": "object", "required": [ "messageId" ], "properties": { "messageId": { "type": "string", "description": "message id (internal)" } } } } } }, "responses": { "200": { "description": "Mark delivering", "content": { "application/json": { "schema": { "properties": { "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } }, "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "userEntityMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isDeleted": { "type": "boolean", "description": "flag to check if channel marker deleted" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "membership": { "type": "string", "description": "membership status of user in channel", "enum": [ "member", "banned", "muted", "non-member", "deleted" ] }, "createdAt": { "type": "string", "description": "The date/time when user channel markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user channel markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/markers/message-feeds/{messageFeedId}/mark-read": { "put": { "tags": [ "Marker" ], "summary": "Mark message feeds as read", "security": [ { "BearerAuth": [] } ], "description": "Mark message feeds as read", "parameters": [ { "name": "messageFeedId", "description": "message feed id (internal)", "in": "path", "required": true, "schema": { "type": "string", "description": "message feed id (internal)" } } ], "requestBody": { "description": "Mark read", "content": { "application/json": { "schema": { "type": "object", "required": [ "readToSegment" ], "properties": { "readToSegment": { "type": "number", "description": "segment of message as read by user" } } } } } }, "responses": { "200": { "description": "Mark read", "content": { "application/json": { "schema": { "properties": { "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } }, "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "userEntityMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isDeleted": { "type": "boolean", "description": "flag to check if channel marker deleted" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "membership": { "type": "string", "description": "membership status of user in channel", "enum": [ "member", "banned", "muted", "non-member", "deleted" ] }, "createdAt": { "type": "string", "description": "The date/time when user channel markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user channel markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/markers/message-feeds/{messageFeedId}/start-reading": { "post": { "tags": [ "Marker" ], "summary": "Start reading message feeds", "security": [ { "BearerAuth": [] } ], "description": "Start reading message feeds", "parameters": [ { "name": "messageFeedId", "description": "message feed id (internal)", "in": "path", "required": true, "schema": { "type": "string", "description": "message feed id (internal)" } } ], "responses": { "200": { "description": "Start reading", "content": { "application/json": { "schema": { "properties": { "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } }, "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "userEntityMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isDeleted": { "type": "boolean", "description": "flag to check if channel marker deleted" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "membership": { "type": "string", "description": "membership status of user in channel", "enum": [ "member", "banned", "muted", "non-member", "deleted" ] }, "createdAt": { "type": "string", "description": "The date/time when user channel markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user channel markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/markers/message-feeds/{messageFeedId}/stop-readings": { "post": { "tags": [ "Marker" ], "summary": "Stop reading message feeds", "security": [ { "BearerAuth": [] } ], "description": "Stop reading message feeds", "parameters": [ { "name": "messageFeedId", "description": "message feed id (internal)", "in": "path", "required": true, "schema": { "type": "string", "description": "message feed id (internal)" } } ], "responses": { "200": { "description": "Stop reading", "content": { "application/json": { "schema": { "properties": { "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } }, "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "userEntityMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isDeleted": { "type": "boolean", "description": "flag to check if channel marker deleted" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "membership": { "type": "string", "description": "membership status of user in channel", "enum": [ "member", "banned", "muted", "non-member", "deleted" ] }, "createdAt": { "type": "string", "description": "The date/time when user channel markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user channel markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/markers/message-feeds/reading": { "post": { "tags": [ "Marker" ], "summary": "Mark message feeds as read", "security": [ { "BearerAuth": [] } ], "description": "Mark message feeds as read", "requestBody": { "description": "Message feed reading", "content": { "application/json": { "schema": { "type": "object", "required": [ "messageFeedIds" ], "properties": { "messageFeedIds": { "type": "array", "items": { "type": "string", "description": "message feed id (internal)" } } } } } } }, "responses": { "200": { "description": "Message feed reading", "content": { "application/json": { "schema": { "properties": { "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } }, "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "userEntityMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isDeleted": { "type": "boolean", "description": "flag to check if channel marker deleted" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "membership": { "type": "string", "description": "membership status of user in channel", "enum": [ "member", "banned", "muted", "non-member", "deleted" ] }, "createdAt": { "type": "string", "description": "The date/time when user channel markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user channel markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/markers/messages": { "get": { "tags": [ "Marker" ], "summary": "Get marker for messages", "security": [ { "BearerAuth": [] } ], "description": "Get marker for messages", "parameters": [ { "name": "messageIds", "description": "list of message id (internal)", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "string", "description": "list of message id (internal)" } } } ], "responses": { "200": { "description": "Get marker message", "content": { "application/json": { "schema": { "properties": { "contentMarkers": { "type": "array", "items": { "type": "object", "properties": { "contentId": { "type": "string", "description": "message id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "segment": { "type": "number", "description": "segment of message" }, "creatorId": { "type": "string", "description": "user id (internal) of creator" }, "readCount": { "type": "number", "description": "count of read users" }, "deliveredCount": { "type": "number", "description": "count of delivered users" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } }, "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "userEntityMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isDeleted": { "type": "boolean", "description": "flag to check if channel marker deleted" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "membership": { "type": "string", "description": "membership status of user in channel", "enum": [ "member", "banned", "muted", "non-member", "deleted" ] }, "createdAt": { "type": "string", "description": "The date/time when user channel markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user channel markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/markers/messages/{messageId}/delivered-users": { "get": { "tags": [ "Marker" ], "summary": "Get list of users who delivered the message", "security": [ { "BearerAuth": [] } ], "description": "Get list of users who delivered the message", "parameters": [ { "name": "messageId", "description": "message id (internal)", "in": "path", "required": true, "schema": { "type": "string", "description": "message id (internal)" } } ], "responses": { "200": { "description": "Get delivered users", "content": { "application/json": { "schema": { "properties": { "publicUserIds": { "type": "array", "items": { "type": "string", "description": "list of public user id" } }, "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } }, "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "userEntityMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isDeleted": { "type": "boolean", "description": "flag to check if channel marker deleted" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "membership": { "type": "string", "description": "membership status of user in channel", "enum": [ "member", "banned", "muted", "non-member", "deleted" ] }, "createdAt": { "type": "string", "description": "The date/time when user channel markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user channel markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/markers/messages/{messageId}/read-users": { "get": { "tags": [ "Marker" ], "summary": "Get list of users who read the message", "security": [ { "BearerAuth": [] } ], "description": "Get list of users who read the message", "parameters": [ { "name": "messageId", "description": "message id (internal)", "in": "path", "required": true, "schema": { "type": "string", "description": "message id (internal)" } } ], "responses": { "200": { "description": "Get Read users", "content": { "application/json": { "schema": { "properties": { "publicUserIds": { "type": "array", "items": { "type": "string", "description": "list of public user id" } }, "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } }, "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "userEntityMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isDeleted": { "type": "boolean", "description": "flag to check if channel marker deleted" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "membership": { "type": "string", "description": "membership status of user in channel", "enum": [ "member", "banned", "muted", "non-member", "deleted" ] }, "createdAt": { "type": "string", "description": "The date/time when user channel markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user channel markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/markers/sync": { "post": { "tags": [ "Marker" ], "summary": "Marker sync", "security": [ { "BearerAuth": [] } ], "description": "Marker sync for update unread count", "requestBody": { "description": "Marker sync", "content": { "application/json": { "schema": { "type": "object", "properties": { "deviceLastSyncAt": { "type": "string", "description": "The date/time when user device last sync.", "format": "date-time" } } } } } }, "responses": { "200": { "description": "Sync for update unread count", "content": { "application/json": { "schema": { "properties": { "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } }, "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "userEntityMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isDeleted": { "type": "boolean", "description": "flag to check if channel marker deleted" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "membership": { "type": "string", "description": "membership status of user in channel", "enum": [ "member", "banned", "muted", "non-member", "deleted" ] }, "createdAt": { "type": "string", "description": "The date/time when user channel markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user channel markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/markers/user-message-feed": { "get": { "tags": [ "Marker" ], "summary": "Query Latest 100 user feed marker by a list of entity Id (channel id)", "security": [ { "BearerAuth": [] } ], "description": "Query Latest 100 user feed marker by a list of entity Id (channel id)", "parameters": [ { "name": "channelIds", "description": "list of channel id (internal)", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "string", "description": "list of channel id (internal)" } } } ], "responses": { "200": { "description": "Get marker user message feed", "content": { "application/json": { "schema": { "properties": { "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/markers/userMarker": { "get": { "tags": [ "Marker" ], "summary": "Get marker for user", "security": [ { "BearerAuth": [] } ], "description": "Get marker for user", "responses": { "200": { "description": "Get marker user", "content": { "application/json": { "schema": { "properties": { "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v1/reports/moderation-activity": { "get": { "summary": "Query moderation activity reports", "description": "Retrieve moderation activity reports with pagination. This endpoint allows administrators to query\nmoderation activities including flagged content, banned users, deleted posts/comments, and other\nmoderation-related events. Requires admin permissions and moderation reporting to be enabled.\n", "tags": [ "Moderation" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20, "example": 20 }, "description": "Number of items to return per page" }, { "name": "token", "in": "query", "schema": { "type": "string", "maxLength": 1000, "example": "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==" }, "description": "Pagination token for retrieving the next or previous page of results" } ], "responses": { "200": { "description": "List of available moderation activity report files", "content": { "application/json": { "schema": { "type": "object", "properties": { "reports": { "type": "array", "description": "Array of available moderation activity report files", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Base64 encoded file identifier used for downloading the report", "example": "bW9kZXJhdGlvbi1hY3Rpdml0eS1sb2ctMjAyNS0wNy0xNy5jc3Y=" }, "fileName": { "type": "string", "description": "Human-readable name of the report file", "example": "moderation-activity-log-2025-07-17.csv" }, "fileSize": { "type": "integer", "description": "Size of the file in bytes", "example": 137065 }, "lastModified": { "type": "string", "format": "date-time", "description": "When the file was last modified", "example": "2025-07-18T00:06:47.000Z" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string", "nullable": true, "description": "Token for the next page of results", "example": "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==" }, "previous": { "type": "string", "nullable": true, "description": "Token for the previous page of results", "example": "eyJiZWZvcmUiOnsiaWQiOiI2NGYxYTJiM2M0ZDVlNmY3YThiOWMwZDEifX0=" } } } } }, "examples": { "success": { "summary": "Successful response with available report files", "value": { "reports": [ { "fileId": "bW9kZXJhdGlvbi1hY3Rpdml0eS1sb2ctMjAyNS0wNy0xNy5jc3Y=", "fileName": "moderation-activity-log-2025-07-17.csv", "fileSize": 137065, "lastModified": "2025-07-18T00:06:47.000Z" }, { "fileId": "bW9kZXJhdGlvbi1hY3Rpdml0eS1sb2ctMjAyNS0wNy0xNi5jc3Y=", "fileName": "moderation-activity-log-2025-07-16.csv", "fileSize": 89432, "lastModified": "2025-07-17T00:06:12.000Z" } ], "paging": { "next": "eyJhZnRlciI6eyJmaWxlSWQiOiJiVzlrWlhKaGRHbHZiaTFoWTNScGRtbDBlUzFzYjJjdE1qQXlOUzB3Tnkwd05pNWpjM1k9In19", "previous": null } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/reports/moderation-activity/download": { "get": { "summary": "Download moderation activity report", "description": "Download a specific moderation activity report file. Returns a redirect to a signed URL for\ndownloading the report file. Requires admin permissions and moderation reporting to be enabled.\n", "tags": [ "Moderation" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "fileId", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 1000, "example": "64f1a2b3c4d5e6f7a8b9c0d1" }, "description": "The unique identifier of the file to download" }, { "name": "fileName", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 1000, "example": "moderation-report-2024-01-15.csv" }, "description": "The name of the file to download" } ], "responses": { "302": { "description": "Redirect to signed URL for file download", "headers": { "Location": { "description": "The signed URL for downloading the file", "schema": { "type": "string", "format": "uri" } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/reports/user-last-activity": { "get": { "summary": "Get Users Last Activity Report", "description": "Retrieve the last activity report for users in the network. Requires admin permissions.\n", "tags": [ "User" ], "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Users last activity report", "content": { "application/json": { "schema": { "type": "object", "properties": { "networkId": { "type": "string" }, "downloadUrl": { "type": "string", "description": "URL to download the last activity report", "example": "https://example.com/reports/user-last-activity.csv" } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/users/bulk-delete/jobs": { "post": { "summary": "Create Bulk User Delete Job", "description": "Create a bulk delete job to delete multiple users. This endpoint accepts a CSV file containing\nuser IDs and creates deletion jobs for processing. Requires admin permissions.\n", "tags": [ "User" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "file" ], "properties": { "file": { "type": "string", "format": "binary", "description": "CSV file containing user IDs to delete" }, "deleteOptions": { "type": "string", "description": "JSON string containing delete options", "example": "{\"deleteAll\":true,\"markMessageDeleted\":false,\"hardDeletePost\":false,\"hardDeleteComment\":false}" } } } } } }, "responses": { "202": { "description": "Bulk delete job created successfully (Accepted)", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the bulk delete job", "example": "507f1f77bcf86cd799439011" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Get Bulk User Delete Jobs", "description": "Retrieve the list of bulk user delete jobs. This endpoint returns all bulk deletion jobs\nfor the network with their current status. Requires admin permissions.\n", "tags": [ "User" ], "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "List of bulk delete jobs", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the bulk delete job", "example": "507f1f77bcf86cd799439011" }, "statuses": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "WAITING", "RUNNING", "DONE", "FAIL" ] }, "_id": { "type": "string" } } } }, "lastUpdatedAt": { "type": "string", "format": "date-time", "description": "Job last update timestamp", "example": "2025-10-08T11:00:00Z" }, "lastCreatedAt": { "type": "string", "format": "date-time", "description": "Job creation timestamp", "example": "2025-10-08T10:30:00Z" } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/reports/1p/download": { "get": { "summary": "Get first-party data export", "description": "Download first-party data for a network. This endpoint allows administrators to access exported data for various entity types.\n\n**Note:** Before using this API, you must contact our support team to enable first-party data export for your network.\n", "tags": [ "Admin" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "dataType", "in": "query", "required": true, "description": "The type of first-party data to retrieve. Specifies which data export to download.\n", "schema": { "type": "string", "enum": [ "comments_last_90d", "communities", "community_members", "posts_last_90d", "reactions_last_90d", "roles", "users" ] }, "example": "users" } ], "responses": { "302": { "description": "Redirect to URL for file download", "headers": { "Location": { "description": "The URL for downloading the first-party data export", "schema": { "type": "string", "format": "uri" } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/v1/blacklist/records": { "put": { "summary": "Refresh black list", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Refresh the black list\n", "requestBody": { "description": "Regular expression to refresh.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "regexs": { "type": "array", "items": { "type": "string" } } }, "required": [ "regexs" ] } } } }, "responses": { "200": { "description": "OK" } } }, "post": { "summary": "Add rules to black list", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Add rules to the black list\n", "requestBody": { "description": "Regular expression to add.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "regexs": { "type": "array", "items": { "type": "string" } } }, "required": [ "regexs" ] } } } }, "responses": { "200": { "description": "OK" } } }, "delete": { "summary": "Delete rules from black list", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Delete rules from the black list\n", "parameters": [ { "name": "ruleIds", "description": "Regular expression to delete.\n", "in": "query", "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "OK" } } } }, "/api/v2/blacklist/records": { "get": { "summary": "get rules of blacklist.", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Get rules of blacklist.\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "regexs", "in": "query", "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "rules of blacklist Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "results": { "type": "array", "items": { "type": "object", "properties": { "ruleId": { "type": "string" }, "regex": { "type": "string", "description": "Rule of blacklist." }, "isMatchExactWord": { "type": "boolean" }, "isEnabled": { "type": "boolean", "description": "A flag to enabled a rule." }, "isDeleted": { "type": "boolean", "description": "A flag to deleted a rule." }, "createdAt": { "type": "string", "description": "The date/time when a rule is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a rule is updated or deleted.", "format": "date-time" } }, "required": [ "regex" ] } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 404, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } }, "put": { "summary": "refresh rules of blacklist.", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Refresh rules of blacklist.\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Rules information to be refreshed.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "regexs": { "type": "array", "items": { "type": "string" } } }, "required": [ "regexs" ] } } } }, "responses": { "200": { "description": "OK" }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 404, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } }, "post": { "summary": "add rules to blacklist.", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Add rules to blacklist\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Rules information to be added.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "regexs": { "type": "array", "items": { "type": "string" } }, "isMatchExactWord": { "type": "boolean" } }, "required": [ "regexs" ] } } } }, "responses": { "200": { "description": "OK" }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 404, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } }, "delete": { "summary": "delete rules from blacklist", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Delete rule from blacklist\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "ruleIds", "description": "Rules information to be deleted.\n", "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 404, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } } }, "/api/v2/blacklist/records/{ruleId}": { "put": { "summary": "update rule of blacklist.", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Update rule of blacklist.\n", "parameters": [ { "in": "path", "name": "ruleId", "description": "Rule ID to be updated.", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Rules information to be updated.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "ruleId": { "type": "string" }, "isEnabled": { "type": "boolean" } }, "required": [ "ruleId", "isEnabled" ] } } } }, "responses": { "200": { "description": "rule of blacklist Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "ruleId": { "type": "string" }, "regex": { "type": "string", "description": "Rule of blacklist." }, "isMatchExactWord": { "type": "boolean" }, "isEnabled": { "type": "boolean", "description": "A flag to enabled a rule." }, "isDeleted": { "type": "boolean", "description": "A flag to deleted a rule." }, "createdAt": { "type": "string", "description": "The date/time when a rule is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a rule is updated or deleted.", "format": "date-time" } }, "required": [ "regex" ] } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 404, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } } }, "/api/v2/moderation-settings": { "get": { "summary": "get a moderation setting", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } } ], "description": "Get a moderation setting.\n", "responses": { "200": { "description": "Moderation Setting Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "maxRepetition": { "type": "integer" }, "maxRepetitionTimeout": { "type": "integer" }, "blacklistMuteTimeout": { "type": "integer" }, "whitelistMuteTimeout": { "type": "integer" }, "maxRepetitionMuteTimeout": { "type": "integer" }, "enableImageModeration": { "type": "boolean" }, "imageModeration": { "type": "object", "properties": { "nudity": { "type": "number" }, "suggestive": { "type": "number" }, "violence": { "type": "number" }, "disturbing": { "type": "number" } } }, "createdAt": { "type": "string", "description": "The date/time when a rule is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a rule is updated or deleted.", "format": "date-time" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } }, "put": { "summary": "update a moderation setting", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Update a moderation setting\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "moderation setting information\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "maxRepetition": { "type": "integer", "minimum": 0 }, "maxRepetitionTimeout": { "type": "integer", "minimum": 0 }, "blacklistMuteTimeout": { "type": "integer", "minimum": 0 }, "whitelistMuteTimeout": { "type": "integer", "minimum": 0 }, "maxRepetitionMuteTimeout": { "type": "integer", "minimum": 0 }, "enableImageModeration": { "type": "boolean" }, "imageModeration": { "type": "object", "properties": { "nudity": { "type": "number", "minimum": 0 }, "suggestive": { "type": "number", "minimum": 0 }, "violence": { "type": "number", "minimum": 0 }, "disturbing": { "type": "number", "minimum": 0 } } } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "string" } }, "example": { "status": "success", "code": 200 } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } } }, "/api/v2/whitelist/records": { "get": { "summary": "get rules of whitelist.", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Get rules of whitelist.\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "regexs", "in": "query", "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "rules of whitelist Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "results": { "type": "array", "items": { "type": "object", "properties": { "ruleId": { "type": "string" }, "regex": { "type": "string", "description": "Rule of whitelist." }, "isEnabled": { "type": "boolean", "description": "A flag to enabled a rule." }, "isDeleted": { "type": "boolean", "description": "A flag to deleted a rule." }, "createdAt": { "type": "string", "description": "The date/time when a rule is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a rule is updated or deleted.", "format": "date-time" } }, "required": [ "regex" ] } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 404, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } }, "put": { "summary": "refresh rules of whitelist.", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Refresh rules of whitelist.\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Rules information to be refreshed.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "regexs": { "type": "array", "items": { "type": "string" } } }, "required": [ "regexs" ] } } } }, "responses": { "200": { "description": "OK" }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 404, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } }, "post": { "summary": "add rules to whitelist.", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Add rules to whitelist\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Rules information to be added.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "regexs": { "type": "array", "items": { "type": "string" } }, "isMatchExactWord": { "type": "boolean" } }, "required": [ "regexs" ] } } } }, "responses": { "200": { "description": "OK" }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 404, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } }, "delete": { "summary": "delete rules from whitelist", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Delete rule from whitelist\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "ruleIds", "description": "Rules information to be deleted.\n", "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 404, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } } }, "/api/v2/whitelist/records/{ruleId}": { "put": { "summary": "update rule of whitelist.", "tags": [ "Moderation" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Update rule of whitelist.\n", "parameters": [ { "in": "path", "name": "ruleId", "description": "Rule ID to be updated.", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Rules information to be updated.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "ruleId": { "type": "string" }, "isEnabled": { "type": "boolean" } }, "required": [ "ruleId", "isEnabled" ] } } } }, "responses": { "200": { "description": "rule of whitelist Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "ruleId": { "type": "string" }, "regex": { "type": "string", "description": "Rule of whitelist." }, "isEnabled": { "type": "boolean", "description": "A flag to enabled a rule." }, "isDeleted": { "type": "boolean", "description": "A flag to deleted a rule." }, "createdAt": { "type": "string", "description": "The date/time when a rule is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a rule is updated or deleted.", "format": "date-time" } }, "required": [ "regex" ] } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 404, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } } }, "/api/v3/allowlists": { "get": { "summary": "Get list of allowed words", "security": [ { "BearerAuth": [] } ], "tags": [ "Moderation" ], "parameters": [ { "name": "regex", "in": "query", "schema": { "type": "string" }, "description": "search keyword from start" }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "firstCreated", "lastCreated" ] } }, { "name": "options", "in": "query", "style": "deepObject", "explode": true, "schema": { "type": "object", "properties": { "after": { "type": "number" }, "before": { "type": "number" }, "limit": { "type": "number", "description": "limit amount of result" }, "token": { "type": "string", "description": "pagination token" } } } } ], "responses": { "200": { "description": "Criteria info", "content": { "application/json": { "schema": { "type": "object", "properties": { "results": { "type": "array", "items": { "type": "object", "properties": { "ruleId": { "type": "string" }, "regex": { "type": "string" }, "isDeleted": { "type": "boolean" }, "isEnabled": { "type": "boolean" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "Add rules of allowlist V3", "tags": [ "Moderation" ], "security": [ { "BearerAuth": [] } ], "description": "Add rules of allowlist.\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Rules information to be added.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "regexs": { "type": "array", "minItems": 0, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 500 } } }, "required": [ "regexs" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/blocklists": { "get": { "summary": "Get list of banned words", "security": [ { "BearerAuth": [] } ], "tags": [ "Moderation" ], "parameters": [ { "name": "regex", "in": "query", "schema": { "type": "string" }, "description": "search keyword from start" }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "firstCreated", "lastCreated" ] } }, { "name": "options", "in": "query", "style": "deepObject", "explode": true, "schema": { "type": "object", "properties": { "after": { "type": "number" }, "before": { "type": "number" }, "limit": { "type": "number", "description": "limit amount of result" }, "token": { "type": "string", "description": "pagination token" } } } } ], "responses": { "200": { "description": "Criteria info", "content": { "application/json": { "schema": { "type": "object", "properties": { "results": { "type": "array", "items": { "type": "object", "properties": { "ruleId": { "type": "string" }, "regex": { "type": "string" }, "isMatchExactWord": { "type": "boolean", "description": "word have to be equally match" }, "isDeleted": { "type": "boolean" }, "isEnabled": { "type": "boolean" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "Add rules of blocklist V3", "tags": [ "Moderation" ], "security": [ { "BearerAuth": [] } ], "description": "Add rules of blocklist.\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Rules information to be added.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "regexs": { "type": "array", "minItems": 0, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 500 } }, "isMatchExactWord": { "type": "boolean", "default": false } }, "required": [ "regexs" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/allowlists/verify": { "post": { "tags": [ "Moderation" ], "security": [ { "BearerAuth": [] } ], "summary": "Verify allowlist", "description": "Verify URLs with the allowlist rules.", "operationId": "verifyAllowlist", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "description": "A list of URLs to be verified", "type": "array", "items": { "type": "string", "maxLength": 500 }, "maxItems": 10, "minItems": 1 } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "description": "Some URLs are not valid", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Some URLs are not valid" } } } }, "403": { "description": "Some URLs are not in the allow list", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400309, "message": "Some URLs are not in the allow list" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } } } } } } } }, "/api/v3/blocklists/verify": { "post": { "tags": [ "Moderation" ], "security": [ { "BearerAuth": [] } ], "summary": "Verify blocklist", "description": "Verify texts with the blocklist rules.", "operationId": "verifyBlocklist", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "description": "A list of URLs to be verified", "type": "array", "items": { "type": "string", "maxLength": 500 }, "maxItems": 10, "minItems": 1 } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "403": { "description": "Some texts contain blocked words", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400308, "message": "Some texts contain blocked words" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } } } } } } } }, "/api/v5/message-feeds": { "post": { "tags": [ "Message Feed" ], "summary": "Add a new message feed", "security": [ { "BearerAuth": [] } ], "description": "Add a new message feed", "requestBody": { "description": "Payload for creating a new message feed", "content": { "application/json": { "schema": { "type": "object", "required": [ "channelId", "name" ], "properties": { "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" } } } } } }, "responses": { "200": { "description": "Message feed payload", "content": { "application/json": { "schema": { "description": "The returned payload of message feed(s)", "type": "object", "properties": { "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "messages": { "description": "List of last messages in each message feed", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "users": { "description": "List of related users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v5/message-feeds/{messageFeedId}": { "get": { "tags": [ "Message Feed" ], "summary": "Find a message feed by ID", "security": [ { "BearerAuth": [] } ], "description": "Return a single message feed", "parameters": [ { "name": "messageFeedId", "in": "path", "required": true, "description": "Message feed ID", "schema": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" } } ], "responses": { "200": { "description": "Message feed payload", "content": { "application/json": { "schema": { "description": "The returned payload of message feed(s)", "type": "object", "properties": { "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "messages": { "description": "List of last messages in each message feed", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "users": { "description": "List of related users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } }, "put": { "tags": [ "Message Feed" ], "summary": "Update a message feed", "description": "Update an existing message feed except the default message feed", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "messageFeedId", "in": "path", "required": true, "description": "Message feed ID", "schema": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" } } ], "requestBody": { "description": "Payload for updating an existing message feed Message feed object that needs to be added", "content": { "application/json": { "schema": { "type": "object", "required": [ "name" ], "properties": { "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" } } } } } }, "responses": { "200": { "description": "Message feed payload", "content": { "application/json": { "schema": { "description": "The returned payload of message feed(s)", "type": "object", "properties": { "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "messages": { "description": "List of last messages in each message feed", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "users": { "description": "List of related users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } }, "403": { "description": "Forbidden error" }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } }, "delete": { "tags": [ "Message Feed" ], "summary": "Delete a message feed", "security": [ { "BearerAuth": [] } ], "description": "Delete an existing message feed except the default message feed", "parameters": [ { "name": "messageFeedId", "in": "path", "required": true, "description": "Message feed ID", "schema": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" } }, { "name": "permanent", "in": "query", "schema": { "type": "boolean", "description": "A flag to confirm permanent deletion", "default": false } } ], "responses": { "200": { "description": "Successful operation" }, "403": { "description": "Forbidden error" }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v5/message-feeds/channel/{channelId}": { "get": { "tags": [ "Message Feed" ], "summary": "Finds message feeds by channelId and multiple conditions", "description": "Multiple conditions can be provided by query string", "security": [ { "BearerAuth": [] } ], "operationId": "findMessageFeedsByConditions", "parameters": [ { "name": "channelId", "in": "path", "required": true, "description": "channel ID of message feed that needs to be find", "schema": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" } }, { "name": "isDeleted", "in": "query", "description": "deleted flag of message feed", "schema": { "type": "boolean", "default": false } }, { "name": "options", "in": "query", "description": "Pagination options\n\n**after**: string(30) : return documents after this message feed id\n\n**before**: string(30) : return documents before this message feed id\n\n**limit**: number(0, 100) default=10\n\n**sortBy**: lastContentTimestampDesc\n\n**token**: string(100) : This token will be generated by server using encryption of after, before, limit, sortBy. It would be returned in response payload (paging.next, paging.previous). The caller can send only token for getting data from previous or next page easily.\n", "schema": { "description": "Page options by using cursor", "type": "object", "properties": { "after": { "type": "string", "maxLength": 30 }, "before": { "type": "string", "maxLength": 30 }, "limit": { "type": "number", "format": "int32" }, "sortBy": { "type": "string", "default": "lastMessageTimestampDesc", "enum": [ "lastMessageTimestampAsc", "lastMessageTimestampDesc" ] }, "token": { "type": "string", "maxLength": 100 } } } } ], "responses": { "200": { "description": "Paginated message feed payload", "content": { "application/json": { "schema": { "description": "The returned payload of message feed(s)", "type": "object", "properties": { "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "messages": { "description": "List of last messages in each message feed", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "users": { "description": "List of related users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "paging": { "description": "Paging response", "type": "object", "properties": { "next": { "type": "string", "description": "token for getting the next page of data", "maxLength": 100 }, "previous": { "type": "string", "description": "token for getting the previous page of data", "maxLength": 100 }, "total": { "type": "number", "format": "int32" } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v5/message-feeds/list": { "get": { "tags": [ "Message Feed" ], "security": [ { "BearerAuth": [] } ], "summary": "Find message feeds by list of ID's", "description": "Multiple message feed id values can be provided with array format", "parameters": [ { "name": "messageFeedIds", "in": "query", "required": true, "description": "List of message feed ID that needs to find (max=10) [messageFeedIds[]=messageFeedId1&messageFeedIds[]=messageFeedId2]", "schema": { "description": "List of message feed IDs", "type": "array", "items": { "type": "string", "maxLength": 30 }, "maxItems": 10, "example": [ "a85dca058f5b585f86a29f14" ] } } ], "responses": { "200": { "description": "Message feed payload", "content": { "application/json": { "schema": { "description": "The returned payload of message feed(s)", "type": "object", "properties": { "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "messages": { "description": "List of last messages in each message feed", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "users": { "description": "List of related users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v5/message-feeds/user/{creatorId}": { "get": { "tags": [ "Message Feed" ], "security": [ { "BearerAuth": [] } ], "summary": "Finds message feeds by creatorId and multiple conditions", "description": "Conditions can be provided in query string", "operationId": "findMessageFeedsByCreatorId", "parameters": [ { "name": "creatorId", "in": "path", "required": true, "description": "ID of message feed creator", "schema": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" } }, { "name": "isDeleted", "in": "query", "description": "deleted flag of message feed", "schema": { "type": "boolean", "default": false } }, { "name": "options", "in": "query", "description": "Pagination options\n\n**after**: string(30) : return documents after this message feed id\n\n**before**: string(30) : return documents before this message feed id\n\n**limit**: number(0, 100) default=10\n\n**sortBy**: lastContentTimestampDesc\n\n**token**: string(100) : This token will be generated by server using encryption of after, before, limit, sortBy. It would be returned in response payload (paging.next, paging.previous). The caller can send only token for getting data from previous or next page easily.\n", "schema": { "description": "Page options by using cursor", "type": "object", "properties": { "after": { "type": "string", "maxLength": 30 }, "before": { "type": "string", "maxLength": 30 }, "limit": { "type": "number", "format": "int32" }, "sortBy": { "type": "string", "default": "lastMessageTimestampDesc", "enum": [ "lastMessageTimestampAsc", "lastMessageTimestampDesc" ] }, "token": { "type": "string", "maxLength": 100 } } } } ], "responses": { "200": { "description": "Message feed payload", "content": { "application/json": { "schema": { "description": "The returned payload of message feed(s)", "type": "object", "properties": { "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "messages": { "description": "List of last messages in each message feed", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "users": { "description": "List of related users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } } } }, "/api/v3/messages": { "get": { "summary": "query messages", "tags": [ "Message" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "channelId", "required": true, "in": "query", "schema": { "type": "string", "maxLength": 100 } }, { "name": "type", "in": "query", "schema": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ] } }, { "name": "parentId", "in": "query", "schema": { "type": "string", "maxLength": 150 } }, { "name": "filterByParentId", "in": "query", "schema": { "type": "boolean", "default": false } }, { "name": "hasFlag", "in": "query", "schema": { "type": "boolean" } }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "isDeleted:\n * `null(default)` - Show both message is actived and message is inactived.\n * `true` - Show message is inactived only.\n * `false` - Show message is actived only.\n" }, { "name": "tags", "in": "query", "schema": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 100 } }, "description": "Used for querying messages by matching all specified tags. When a query includes multiple tags (e.g., `tags=['tag1', 'tag2', 'tag3']`), the system will return all messages that have all the specified tags." }, { "name": "excludeTags", "in": "query", "schema": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 100 } }, "description": "Used for querying messages by excluding all specified tags. When a query includes multiple tags (e.g., `excludeTags=['tag1', 'tag2', 'tag3']`), the system will return all messages that do not have any of the specified tags." }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "after": { "type": "integer", "minimum": 1 }, "first": { "type": "integer", "minimum": 1, "maximum": 100 }, "before": { "type": "integer", "minimum": 1 }, "last": { "type": "integer", "minimum": 1, "maximum": 100 }, "token": { "type": "string", "maxLength": 1000 } } } } ], "responses": { "200": { "description": "Messages Information", "content": { "application/json": { "schema": { "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ] }, "data": { "type": "object", "description": "Body of a message." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "fileId": { "type": "string", "description": "file key on cloud storage." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "create a message", "tags": [ "Message" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "Information of message to be created\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "channelId": { "type": "string", "maxLength": 150 }, "messageId": { "type": "string", "maxLength": 150 }, "type": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ], "default": "text" }, "data": { "type": "object", "properties": { "text": { "type": "string", "maxLength": 20000 } } }, "fileId": { "type": "string", "maxLength": 50 }, "parentId": { "type": "string", "maxLength": 150 }, "metadata": { "type": "object" }, "tags": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 30 } }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "maxItems": 2, "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type:\n * `user` - need to specific userIds and notification mentions individual user\n * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" }, "maxItems": 30 } }, "required": [ "type" ] } } }, "required": [ "channelId" ] } } } }, "responses": { "200": { "description": "Messages Information", "content": { "application/json": { "schema": { "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ] }, "data": { "type": "object", "description": "Body of a message." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "fileId": { "type": "string", "description": "file key on cloud storage." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "ForbiddenAvatarError": { "summary": "Put file type not image into avatar", "value": { "status": "error", "code": 400300, "message": "Avatar must be an image." } }, "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } }, "UserIsMutedError": { "summary": "User is muted from the channel.", "value": { "status": "error", "code": 400302, "message": "User is muted from the channel." } }, "ChannelIsMutedError": { "summary": "Channel is muted.", "value": { "status": "error", "code": 400303, "message": "Channel is muted." } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } }, "MaxRepetitionExceed": { "summary": "User create too many same messages in short period of times.", "value": { "status": "error", "code": 400307, "message": "Max Repetition Exceed" } }, "BanWordFoundError": { "summary": "Banned word are found in the messages.", "value": { "status": "error", "code": 400308, "message": "Data contain blacklist word" } }, "LinkNotAllowedError": { "summary": "Unallowed link are found in the messages.", "value": { "status": "error", "code": 400309, "message": "Data contain link that is not in whitelist" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Put a wrong request parameters.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters error.", "data": { "detail": [ "The 'data.text' field length must be less than or equal to 20000 characters long." ] } } } } } } } }, "/api/v3/messages/list": { "get": { "summary": "get list of messages", "tags": [ "Message" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "messageIds", "in": "query", "required": true, "schema": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 150 } } } ], "responses": { "200": { "description": "Messages Information", "content": { "application/json": { "schema": { "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ] }, "data": { "type": "object", "description": "Body of a message." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "fileId": { "type": "string", "description": "file key on cloud storage." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/messages/{messageId}": { "get": { "summary": "get a message", "tags": [ "Message" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "messageId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 150 } } ], "responses": { "200": { "description": "Messages Information", "content": { "application/json": { "schema": { "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ] }, "data": { "type": "object", "description": "Body of a message." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "fileId": { "type": "string", "description": "file key on cloud storage." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "update a message", "tags": [ "Message" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "messageId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 150 } } ], "requestBody": { "description": "Information of message to be updated\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "text": { "type": "string", "maxLength": 20000 } } }, "metadata": { "type": "object" }, "tags": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 30 } }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "maxItems": 2, "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type:\n * `user` - need to specific userIds and notification mentions individual user\n * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" }, "maxItems": 30 } }, "required": [ "type" ] } } } } } } }, "responses": { "200": { "description": "Messages Information", "content": { "application/json": { "schema": { "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ] }, "data": { "type": "object", "description": "Body of a message." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "fileId": { "type": "string", "description": "file key on cloud storage." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "ForbiddenAvatarError": { "summary": "Put file type not image into avatar", "value": { "status": "error", "code": 400300, "message": "Avatar must be an image." } }, "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } }, "MaxRepetitionExceed": { "summary": "User create too many same messages in short period of times.", "value": { "status": "error", "code": 400307, "message": "Max Repetition Exceed" } }, "BanWordFoundError": { "summary": "Banned word are found in the messages.", "value": { "status": "error", "code": 400308, "message": "Data contain blacklist word" } }, "LinkNotAllowedError": { "summary": "Unallowed link are found in the messages.", "value": { "status": "error", "code": 400309, "message": "Data contain link that is not in whitelist" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Put a wrong request parameters.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters error.", "data": { "detail": [ "The 'data.text' field length must be less than or equal to 20000 characters long." ] } } } } } } }, "delete": { "summary": "delete a message", "tags": [ "Message" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "messageId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 150 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" } } } } } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/messages/{messageId}/flag": { "post": { "summary": "flag a message", "tags": [ "Message" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "messageId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 150 } } ], "responses": { "200": { "description": "Messages Information", "content": { "application/json": { "schema": { "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ] }, "data": { "type": "object", "description": "Body of a message." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "fileId": { "type": "string", "description": "file key on cloud storage." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "403": { "description": "Error Response", "content": { "application/json": { "examples": { "ForbiddenError": { "summary": "No permission to access this resource.", "value": { "status": "error", "code": 400300, "message": "Forbidden error." } }, "PermissionDeniedError": { "summary": "Permission denied.", "value": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } }, "UserIsBannedError": { "summary": "User is banned from a channel / community.", "value": { "status": "error", "code": 400304, "message": "User is banned from a channel / community." } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/messages/{messageId}/unflag": { "delete": { "summary": "unflag a message", "tags": [ "Message" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "messageId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 150 } } ], "responses": { "200": { "description": "Messages Information", "content": { "application/json": { "schema": { "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ] }, "data": { "type": "object", "description": "Body of a message." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "fileId": { "type": "string", "description": "file key on cloud storage." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/messages/{messageId}/clearFlags": { "delete": { "summary": "clear flags", "tags": [ "Message" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "messageId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 150 } } ], "responses": { "200": { "description": "Messages Information", "content": { "application/json": { "schema": { "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ] }, "data": { "type": "object", "description": "Body of a message." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "fileId": { "type": "string", "description": "file key on cloud storage." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/messages/{messageId}/isFlaggedByMe": { "get": { "summary": "is message flag by me", "tags": [ "Message" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "messageId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 150 } } ], "responses": { "200": { "description": "Is flag by me response.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "result": { "type": "boolean" } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v5/messages": { "post": { "tags": [ "Message" ], "summary": "Create a new message in message feed", "description": "Create a new message", "requestBody": { "description": "Message object that needs to be added", "content": { "application/json": { "schema": { "type": "object", "required": [ "referenceId", "dataType", "messageFeedId" ], "properties": { "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "referenceId": { "description": "A reference ID", "type": "string", "maxLength": 30, "example": "1530b11ec8df87da22b06b27" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" } } } } } }, "responses": { "200": { "description": "Create message payload", "content": { "application/json": { "schema": { "description": "The returned payload of created message(s)", "type": "object", "properties": { "messages": { "description": "The list of created message", "type": "array", "items": { "allOf": [ { "type": "object", "properties": { "referenceId": { "description": "A reference ID", "type": "string", "maxLength": 30, "example": "1530b11ec8df87da22b06b27" } } }, { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } ] } }, "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } }, "security": [ { "BearerAuth": [] } ] }, "get": { "tags": [ "Message" ], "summary": "Find message by message feed id and multiple conditions", "description": "Multiple conditions can be provided in query string", "parameters": [ { "name": "messageFeedId", "in": "query", "required": true, "description": "Message feed ID", "schema": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" } }, { "name": "parentId", "in": "query", "description": "parent ID of a message (max length=50)", "schema": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" } }, { "name": "isDeleted", "in": "query", "description": "deleted flag of message that needs to be find", "schema": { "description": "Soft delete flag", "type": "boolean", "default": false } }, { "name": "includeTags", "in": "query", "description": "Used for querying messages by matching all specified tags. When a query includes multiple tags (e.g., `tags=['tag1', 'tag2', 'tag3']`), the system will return all messages that have all the specified tags. (max=10)", "schema": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] } }, { "name": "excludeTags", "in": "query", "description": "Used for querying messages by excluding all specified tags. When a query includes multiple tags (e.g., `excludeTags=['tag1', 'tag2', 'tag3']`), the system will return all messages that do not have any of the specified tags. (max=10)", "schema": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] } }, { "name": "hasFlags", "in": "query", "description": "flag to filter only flagged message", "schema": { "description": "A flag to filter only flagged message", "type": "boolean" } }, { "name": "dataType", "in": "query", "description": "data type of message (max length=20)", "schema": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" } }, { "name": "options", "in": "query", "description": "Pagination options\n\n**after**: string(30) : return documents after this message id\n\n**before**: string(30) : return documents before this message id\n\n**limit**: number(0, 100) default=10 if use limit along with options.around, limit must be even number\n\n**sortBy**: segmentAsc | segmentDesc\n\n**token**: string(100) : This token will be generated by server using encryption of after, before, limit, sortBy. It would be returned in response payload (paging.next, paging.previous). The caller can send only token for getting data from previous or next page easily.\n\n**around**: target message id\n", "schema": { "description": "Page options by using cursor", "type": "object", "properties": { "after": { "type": "string", "maxLength": 30 }, "before": { "type": "string", "maxLength": 30 }, "limit": { "type": "number", "format": "int32", "default": 10, "minimum": 1, "maximum": 100 }, "sortBy": { "type": "string", "default": "segmentDesc", "enum": [ "segmentAsc", "segmentDesc" ] }, "token": { "type": "string", "maxLength": 100 }, "around": { "type": "string", "maxLength": 30 } } } } ], "responses": { "200": { "description": "Paginated message payload", "content": { "application/json": { "schema": { "description": "The returned payload of message(s)", "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "paging": { "description": "Paging response", "type": "object", "properties": { "next": { "type": "string", "description": "token for getting the next page of data", "maxLength": 100 }, "previous": { "type": "string", "description": "token for getting the previous page of data", "maxLength": 100 }, "total": { "type": "number", "format": "int32" } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } }, "security": [ { "BearerAuth": [] } ] } }, "/api/v5/messages/{messageId}": { "delete": { "tags": [ "Message" ], "summary": "Delete a message", "description": "Delete a message", "parameters": [ { "name": "messageId", "in": "path", "required": true, "description": "ID of a message", "schema": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" } }, { "name": "permanent", "in": "query", "description": "flag to confirm permanent deletion", "schema": { "type": "boolean", "description": "A flag to confirm permanent deletion", "default": false } } ], "responses": { "200": { "description": "Successful operation" }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } }, "security": [ { "BearerAuth": [] } ] }, "get": { "tags": [ "Message" ], "summary": "Find message by ID", "description": "Returns a single message", "parameters": [ { "name": "messageId", "in": "path", "required": true, "description": "ID of a message", "schema": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" } } ], "responses": { "200": { "description": "Message payload", "content": { "application/json": { "schema": { "description": "The returned payload of message(s)", "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } }, "security": [ { "BearerAuth": [] } ] }, "put": { "tags": [ "Message" ], "summary": "Update a message", "description": "Update a message", "parameters": [ { "name": "messageId", "in": "path", "required": true, "description": "ID of a message", "schema": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" } } ], "requestBody": { "description": "Message object that needs to be updated", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } } } } } } }, "responses": { "200": { "description": "Message payload", "content": { "application/json": { "schema": { "description": "The returned payload of message(s)", "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } }, "security": [ { "BearerAuth": [] } ] } }, "/api/v5/messages/{messageId}/flags/all": { "delete": { "tags": [ "Message" ], "summary": "Delete all flags in message", "description": "Delete all flags in message", "parameters": [ { "name": "messageId", "in": "path", "required": true, "description": "ID of a message", "schema": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" } } ], "responses": { "200": { "description": "Message payload", "content": { "application/json": { "schema": { "description": "The returned payload of message(s)", "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } }, "security": [ { "BearerAuth": [] } ] } }, "/api/v5/messages/{messageId}/flags": { "delete": { "tags": [ "Message" ], "summary": "Delete my flag in a message", "description": "Delete my flag in a message", "parameters": [ { "name": "messageId", "in": "path", "required": true, "description": "ID of a message", "schema": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" } } ], "responses": { "200": { "description": "Message payload", "content": { "application/json": { "schema": { "description": "The returned payload of message(s)", "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } }, "security": [ { "BearerAuth": [] } ] }, "get": { "tags": [ "Message" ], "summary": "Find my flag in message by ID", "description": "Return my flag in message", "parameters": [ { "name": "messageId", "in": "path", "required": true, "description": "ID of a message", "schema": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" } } ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "description": "A flag to filter only flagged message", "type": "boolean" } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } }, "security": [ { "BearerAuth": [] } ] }, "post": { "tags": [ "Message" ], "summary": "Create my flag in a message", "description": "Flag a message", "parameters": [ { "name": "messageId", "in": "path", "required": true, "description": "ID of a message", "schema": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" } } ], "responses": { "200": { "description": "Message payload", "content": { "application/json": { "schema": { "description": "The returned payload of message(s)", "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } }, "security": [ { "BearerAuth": [] } ] } }, "/api/v5/messages/list": { "get": { "tags": [ "Message" ], "summary": "Find messages by message id (max=10)", "description": "Multiple message id values can be provided with array format", "parameters": [ { "name": "messageIds", "in": "query", "required": true, "description": "List of message ID that needs to find (max=10) [messageIds[]=message1&messageIds[]=message2]", "schema": { "description": "A list of message ID", "type": "array", "items": { "type": "string", "maxLength": 30 }, "maxItems": 10, "example": [ "a85dca058f5b585f86a29f14" ] } } ], "responses": { "200": { "description": "Message payload", "content": { "application/json": { "schema": { "description": "The returned payload of message(s)", "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } }, "security": [ { "BearerAuth": [] } ] } }, "/api/v5/messages/user/{creatorId}": { "get": { "tags": [ "Message" ], "summary": "Find messages by creatorId", "description": "This API can be called by admin user only", "parameters": [ { "name": "creatorId", "in": "path", "required": true, "description": "Creator ID to filter", "schema": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" } }, { "name": "channelId", "in": "query", "required": true, "description": "Channel ID to filter", "schema": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" } }, { "name": "hasFlags", "in": "query", "description": "flag to filter only flagged message", "schema": { "description": "A flag to filter only flagged message", "type": "boolean" } }, { "name": "options", "in": "query", "description": "Pagination options\n\n**after**: string(30) : return documents after this message id\n\n**before**: string(30) : return documents before this message id\n\n**limit**: number(0, 100) default=10\n\n**token**: string(100) : This token will be generated by server using encryption of after, before, limit, sortBy. It would be returned in response payload (paging.next, paging.previous). The caller can send only token for getting data from previous or next page easily.\n", "schema": { "description": "Page options by using cursor", "type": "object", "properties": { "after": { "type": "string", "maxLength": 30 }, "before": { "type": "string", "maxLength": 30 }, "limit": { "type": "number", "format": "int32", "default": 10, "minimum": 1, "maximum": 100 }, "token": { "type": "string", "maxLength": 100 } } } } ], "responses": { "200": { "description": "Paginated message payload", "content": { "application/json": { "schema": { "description": "The returned payload of message(s)", "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "myReactions": { "description": "List of reactions of the actor", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "like", "love" ] } } } }, "messageFeeds": { "description": "List of message feeds", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "paging": { "description": "Paging response", "type": "object", "properties": { "next": { "type": "string", "description": "token for getting the next page of data", "maxLength": 100 }, "previous": { "type": "string", "description": "token for getting the previous page of data", "maxLength": 100 }, "total": { "type": "number", "format": "int32" } } } } } } } }, "404": { "description": "Not found error" }, "422": { "description": "Parameters validation error" } }, "security": [ { "BearerAuth": [] } ] } }, "/api/v1/analytics/community-metrics/{communityId}/activities": { "get": { "summary": "Query community activity metrics", "tags": [ "Analytic" ], "security": [ { "BearerAuth": [] } ], "description": "Returns post/comment/reaction activity metrics for a community.\n\nModes:\n - granularity=daily: time series (zero-filled missing dates)\n - granularity=aggregate: aggregate totals across range\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Community ID" }, { "name": "from", "in": "query", "required": false, "schema": { "type": "string", "format": "date" }, "description": "Inclusive start date (YYYY-MM-DD). Defaults to 7 days before yesterday." }, { "name": "to", "in": "query", "required": false, "schema": { "type": "string", "format": "date" }, "description": "Inclusive end date (YYYY-MM-DD). Defaults to yesterday." }, { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "daily", "aggregate" ] }, "description": "daily (default) or aggregate." } ], "responses": { "200": { "description": "Successful activities metrics response", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": [ "granularity", "from", "to", "data" ], "properties": { "granularity": { "type": "string", "enum": [ "daily" ] }, "from": { "type": "string", "format": "date" }, "to": { "type": "string", "format": "date" }, "data": { "type": "array", "items": { "type": "object", "required": [ "date" ], "properties": { "date": { "type": "string", "format": "date" }, "total_posts": { "type": "integer" }, "total_comments": { "type": "integer" }, "total_reactions": { "type": "integer" } } } } } }, { "type": "object", "required": [ "granularity", "from", "to", "value" ], "properties": { "granularity": { "type": "string", "enum": [ "aggregate" ] }, "from": { "type": "string", "format": "date" }, "to": { "type": "string", "format": "date" }, "value": { "type": "object", "properties": { "total_posts": { "type": "integer" }, "total_comments": { "type": "integer" }, "total_reactions": { "type": "integer" } } } } } ] }, "examples": { "daily": { "value": { "granularity": "daily", "from": "2024-05-01", "to": "2024-05-05", "data": [ { "date": "2024-05-01", "total_posts": 1, "total_comments": 0, "total_reactions": 2 }, { "date": "2024-05-02", "total_posts": 0, "total_comments": 0, "total_reactions": 0 }, { "date": "2024-05-03", "total_posts": 5, "total_comments": 2, "total_reactions": 1 }, { "date": "2024-05-04", "total_posts": 0, "total_comments": 0, "total_reactions": 0 }, { "date": "2024-05-05", "total_posts": 2, "total_comments": 1, "total_reactions": 3 } ] } }, "aggregate": { "value": { "granularity": "aggregate", "from": "2024-05-01", "to": "2024-05-31", "value": { "total_posts": 120, "total_comments": 340, "total_reactions": 560 } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/analytics/community-metrics/{communityId}/members": { "get": { "summary": "Query community membership metrics", "tags": [ "Analytic" ], "security": [ { "BearerAuth": [] } ], "description": "Returns membership metrics (total_members, new_members, lost_members).\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Community ID" }, { "name": "from", "in": "query", "required": false, "schema": { "type": "string", "format": "date" }, "description": "Inclusive start date (YYYY-MM-DD). Defaults to 7 days before yesterday." }, { "name": "to", "in": "query", "required": false, "schema": { "type": "string", "format": "date" }, "description": "Inclusive end date (YYYY-MM-DD). Defaults to yesterday." }, { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "daily", "aggregate" ] }, "description": "daily (default) or aggregate." } ], "responses": { "200": { "description": "Successful membership metrics response", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": [ "granularity", "from", "to", "data" ], "properties": { "granularity": { "type": "string", "enum": [ "daily" ] }, "from": { "type": "string", "format": "date" }, "to": { "type": "string", "format": "date" }, "data": { "type": "array", "items": { "type": "object", "required": [ "date" ], "properties": { "date": { "type": "string", "format": "date" }, "total_members": { "type": "integer" }, "new_members": { "type": "integer" }, "lost_members": { "type": "integer" } } } } } }, { "type": "object", "required": [ "granularity", "from", "to", "value" ], "properties": { "granularity": { "type": "string", "enum": [ "aggregate" ] }, "from": { "type": "string", "format": "date" }, "to": { "type": "string", "format": "date" }, "value": { "type": "object", "properties": { "total_members": { "type": "integer" }, "new_members": { "type": "integer" }, "lost_members": { "type": "integer" } } } } } ] }, "examples": { "daily": { "value": { "granularity": "daily", "from": "2024-05-01", "to": "2024-05-05", "data": [ { "date": "2024-05-01", "total_members": 20, "new_members": 3, "lost_members": 0 }, { "date": "2024-05-02", "total_members": 20, "new_members": 0, "lost_members": 0 }, { "date": "2024-05-03", "total_members": 50, "new_members": 30, "lost_members": 0 }, { "date": "2024-05-04", "total_members": 50, "new_members": 0, "lost_members": 0 }, { "date": "2024-05-05", "total_members": 100, "new_members": 50, "lost_members": 0 } ] } }, "aggregate": { "value": { "granularity": "aggregate", "from": "2024-05-01", "to": "2024-05-31", "value": { "total_members": 1000, "new_members": 150, "lost_members": 30 } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/analytics/community-metrics/{communityId}/most-active-day": { "get": { "summary": "Query community Weekday engagement", "tags": [ "Analytic" ], "security": [ { "BearerAuth": [] } ], "description": "Aggregates engagements (posts + comments + reactions) per weekday across the date range.\nReturns all 7 weekdays with sums, counts and average engagements per active day.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Community ID" }, { "name": "from", "in": "query", "required": false, "schema": { "type": "string", "format": "date" }, "description": "Inclusive start date (YYYY-MM-DD). Defaults to 7 days before yesterday." }, { "name": "to", "in": "query", "required": false, "schema": { "type": "string", "format": "date" }, "description": "Inclusive end date (YYYY-MM-DD). Defaults to yesterday." } ], "responses": { "200": { "description": "Successful most active day response", "content": { "application/json": { "schema": { "type": "object", "required": [ "from", "to", "most_active_days" ], "properties": { "from": { "type": "string", "format": "date" }, "to": { "type": "string", "format": "date" }, "most_active_days": { "type": "array", "items": { "type": "object", "required": [ "weekday", "sum_engagements", "days_count", "avg_engagements" ], "properties": { "weekday": { "type": "string" }, "sum_engagements": { "type": "integer" }, "days_count": { "type": "integer" }, "avg_engagements": { "type": "number" } } } } } }, "example": { "from": "2024-05-01", "to": "2024-05-07", "most_active_days": [ { "weekday": "monday", "sum_engagements": 30, "days_count": 2, "avg_engagements": 15 }, { "weekday": "tuesday", "sum_engagements": 10, "days_count": 1, "avg_engagements": 10 }, { "weekday": "wednesday", "sum_engagements": 0, "days_count": 0, "avg_engagements": 0 }, { "weekday": "thursday", "sum_engagements": 0, "days_count": 0, "avg_engagements": 0 }, { "weekday": "friday", "sum_engagements": 0, "days_count": 0, "avg_engagements": 0 }, { "weekday": "saturday", "sum_engagements": 0, "days_count": 0, "avg_engagements": 0 }, { "weekday": "sunday", "sum_engagements": 0, "days_count": 0, "avg_engagements": 0 } ] } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/analytics/community-metrics/{communityId}/most-active-time": { "get": { "summary": "Community Hourly engagement", "tags": [ "Analytic" ], "security": [ { "BearerAuth": [] } ], "description": "Aggregates engagements (posts + comments + reactions) per UTC hour across the date range.\nReturns 24 hours with sums & average engagements per unique day that had any events in that hour.\n", "parameters": [ { "name": "communityId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Community ID" }, { "name": "from", "in": "query", "required": false, "schema": { "type": "string", "format": "date" }, "description": "Inclusive start date (YYYY-MM-DD). Defaults to 7 days before yesterday." }, { "name": "to", "in": "query", "required": false, "schema": { "type": "string", "format": "date" }, "description": "Inclusive end date (YYYY-MM-DD). Defaults to yesterday." } ], "responses": { "200": { "description": "Successful most active time response", "content": { "application/json": { "schema": { "type": "object", "required": [ "from", "to", "most_active_times" ], "properties": { "from": { "type": "string", "format": "date" }, "to": { "type": "string", "format": "date" }, "most_active_times": { "type": "array", "items": { "type": "object", "required": [ "hour", "hour_display", "sum_engagements", "avg_engagements" ], "properties": { "hour": { "type": "integer" }, "hour_display": { "type": "string" }, "sum_engagements": { "type": "integer" }, "avg_engagements": { "type": "number" } } } } } }, "example": { "from": "2024-05-01", "to": "2024-05-07", "most_active_times": [ { "hour": 0, "hour_display": "12:00 AM", "sum_engagements": 0, "avg_engagements": 0 }, { "hour": 9, "hour_display": "9:00 AM", "sum_engagements": 15, "avg_engagements": 5 }, { "hour": 20, "hour_display": "8:00 PM", "sum_engagements": 10, "avg_engagements": 5 } ] } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Unprocessable Content.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error!." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/chat": { "put": { "summary": "Update chat network setting configuration.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Update chat network setting configuration.\n", "requestBody": { "description": "information for a network setting\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "isAllowMentionedChannelEnabled": { "type": "boolean", "default": false }, "messagePreviewSetting": { "type": "object", "description": "Message preview setting", "properties": { "enabled": { "type": "boolean", "default": false, "description": "message preview feature enable or disable" }, "isIncludeDeleted": { "type": "boolean", "default": false, "description": "message preview can be a deleted message, if false return message preview without a deleted message" } }, "required": [ "enabled" ] }, "isAllowAdminViewConversationMessage": { "type": "boolean", "default": true }, "isAllowAdminManageConversationMessage": { "type": "boolean", "default": true }, "allowMemberToUpdateConversationChannel": { "type": "boolean", "default": false, "description": "Allow conversation channel that has more than 2 member wide edit rights" } } } } } }, "responses": { "200": { "description": "Chat configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "mention": { "type": "object", "properties": { "isAllowMentionedChannelEnabled": { "type": "boolean", "default": true } } }, "messagePreview": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": false }, "isIncludeDeleted": { "type": "boolean", "default": false } } }, "isAllowAdminViewConversationMessage": { "type": "boolean", "default": true }, "isAllowAdminManageConversationMessage": { "type": "boolean", "default": true }, "allowMemberToUpdateConversationChannel": { "type": "boolean", "default": false, "description": "`true` - When conversation channel have more than 2 members, all members can edit the channel.
`false` - When conversation channel have more than 2 members, Only people that has permission can edit the conversation channel." } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Get chat network setting configuration.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Get chat network setting configuration.\n", "responses": { "200": { "description": "Chat configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "mention": { "type": "object", "properties": { "isAllowMentionedChannelEnabled": { "type": "boolean", "default": true } } }, "messagePreview": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": false }, "isIncludeDeleted": { "type": "boolean", "default": false } } }, "isAllowAdminViewConversationMessage": { "type": "boolean", "default": true }, "isAllowAdminManageConversationMessage": { "type": "boolean", "default": true }, "allowMemberToUpdateConversationChannel": { "type": "boolean", "default": false, "description": "`true` - When conversation channel have more than 2 members, all members can edit the channel.
`false` - When conversation channel have more than 2 members, Only people that has permission can edit the conversation channel." } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/feed-setting": { "get": { "summary": "Get feed setting check configuration.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Using for get network feed setting check configuration.\n", "responses": { "200": { "description": "Feed setting check configuration", "content": { "application/json": { "schema": { "description": "The content", "type": "object", "properties": { "feedSettings": { "type": "array", "items": { "type": "object", "properties": { "feedType": { "type": "string" }, "contentSettings": { "type": "array", "items": { "type": "object", "properties": { "contentType": { "type": "string" }, "allowed": { "type": "boolean" }, "maxDurationSeconds": { "type": "number" }, "transcodeConfig": { "type": "object", "properties": { "maxResolution": { "type": "string" }, "minResolution": { "type": "string" } } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "Update feed setting check configuration.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Update feed setting check configuration.\n", "requestBody": { "description": "information for a network setting\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "post": { "description": "Feed type post", "type": "object", "properties": { "video": { "description": "Content Check video schema", "type": "object", "properties": { "allowed": { "type": "boolean" }, "transcodeConfig": { "type": "object", "properties": { "maxResolution": { "type": "string", "enum": [ "1080p", "720p", "480p", "360p" ] }, "minResolution": { "type": "string", "enum": [ "1080p", "720p", "480p", "360p" ] } } }, "maxDurationSeconds": { "type": "number", "format": "int32", "minimum": 1, "maximum": 7200 } } } } }, "message": { "description": "Feed type message", "type": "object", "properties": { "video": { "description": "Content Check video schema", "type": "object", "properties": { "allowed": { "type": "boolean" }, "transcodeConfig": { "type": "object", "properties": { "maxResolution": { "type": "string", "enum": [ "1080p", "720p", "480p", "360p" ] }, "minResolution": { "type": "string", "enum": [ "1080p", "720p", "480p", "360p" ] } } }, "maxDurationSeconds": { "type": "number", "format": "int32", "minimum": 1, "maximum": 600 } } } } }, "story": { "description": "Feed type story", "type": "object", "properties": { "video": { "description": "Content Check video schema", "type": "object", "properties": { "allowed": { "type": "boolean" }, "transcodeConfig": { "type": "object", "properties": { "maxResolution": { "type": "string", "enum": [ "1080p", "720p", "480p", "360p" ] }, "minResolution": { "type": "string", "enum": [ "1080p", "720p", "480p", "360p" ] } } }, "maxDurationSeconds": { "type": "number", "format": "int32", "minimum": 1, "maximum": 90 } } } } } } } } } }, "responses": { "200": { "description": "Feed setting check configuration", "content": { "application/json": { "schema": { "description": "The content", "type": "object", "properties": { "feedSettings": { "type": "array", "items": { "type": "object", "properties": { "feedType": { "type": "string" }, "contentSettings": { "type": "array", "items": { "type": "object", "properties": { "contentType": { "type": "string" }, "allowed": { "type": "boolean" }, "maxDurationSeconds": { "type": "number" }, "transcodeConfig": { "type": "object", "properties": { "maxResolution": { "type": "string" }, "minResolution": { "type": "string" } } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/moderation": { "get": { "summary": "Get moderation configuration.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Using for get network moderation configuration.\n", "responses": { "200": { "description": "Moderation configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "isWhitelistEnabled": { "type": "boolean" }, "isReportEnabled": { "type": "boolean" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "Update moderation configuration.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Update moderation configuration.\n", "requestBody": { "description": "information for a network setting\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "isWhitelistEnabled": { "type": "boolean", "description": "`true` - Enabled whitelist validation.\n`false` - Disabled whitelist validation.\n" }, "isReportEnabled": { "type": "boolean", "description": "`true` - Enabled moderation activity report feature.\n`false` - Disabled moderation activity report feature.\n" } } } } } }, "responses": { "200": { "description": "Moderation configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "isWhitelistEnabled": { "type": "boolean" }, "isReportEnabled": { "type": "boolean" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/prehook": { "get": { "tags": [ "Network Setting" ], "summary": "Get prehook configuration.", "description": "Get prehook configuration.", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Prehook configuration", "content": { "application/json": { "schema": { "description": "Prehook Setting", "type": "object", "properties": { "enabled": { "type": "boolean" }, "callbackUrl": { "type": "string" }, "defaultAction": { "type": "string", "enum": [ "allow", "deny" ] } } } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "tags": [ "Network Setting" ], "summary": "Update prehook configuration", "description": "Update prehook configuration", "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "Information of a prehook to be updated.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "callbackUrl": { "type": "string", "maxLength": 900 }, "defaultAction": { "type": "string", "enum": [ "allow", "deny" ] }, "regenerateKey": { "type": "boolean", "description": "An option for regenerating the secret key." } } } } } }, "responses": { "200": { "description": "Prehook configuration", "content": { "application/json": { "schema": { "allOf": [ { "description": "Prehook Setting", "type": "object", "properties": { "enabled": { "type": "boolean" }, "callbackUrl": { "type": "string" }, "defaultAction": { "type": "string", "enum": [ "allow", "deny" ] } } }, { "type": "object", "properties": { "secretKey": { "type": "string", "description": "This will be available only when regenerateKey or enable the feature for the first time" } } } ] } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/social": { "put": { "summary": "Update social configuration.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Update social configuration.\n", "requestBody": { "description": "information for a network setting\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userPrivacySetting": { "type": "string", "enum": [ "public", "private" ] }, "isFollowWithRequestEnabled": { "type": "boolean", "default": false }, "isAllowEditPostWhenReviewingEnabled": { "type": "boolean" }, "showOnlyMyFeed": { "type": "boolean", "default": false }, "showMyPost": { "type": "boolean" }, "showEveryonePost": { "type": "boolean" }, "showCommunityPost": { "type": "boolean" }, "showFollowingPost": { "type": "boolean" }, "isAllowMentionedChannelEnabled": { "type": "boolean" }, "disallowNonMemberInteractInCommunity": { "type": "boolean" }, "storyExpiryTimeMinutes": { "type": "integer", "minimum": 60, "maximum": 1440, "default": 1440 }, "allowAllUserToCreateStory": { "type": "boolean", "description": "Allow all user to create story (default will allow only user that have permission to create story)" }, "allowJoinPrivateCommunity": { "type": "boolean", "deprecated": true, "description": "Controls whether users can join private communities directly or need to be added by moderators.\n\n- `true` - Allow users to join private communities by themselves\n- `false` - Users need to be added to join private communities\n\n**⚠️ DEPRECATED NOTICE**\n\nCommunity moderators are now be able to respond whether to allow users to become members of private communities.\n" }, "maxGlobalPinnedPost": { "description": "Maximum number of global pinned post (only super admin)", "type": "integer", "minimum": 1, "maximum": 20, "default": 1 } } } } } }, "responses": { "200": { "description": "Social configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "userPrivacySetting": { "type": "string", "enum": [ "public", "private" ] }, "membershipAcceptance": { "type": "string", "enum": [ "invitation", "automatic" ], "default": "automatic", "description": "Controls how users can join the network" }, "isFollowWithRequestEnabled": { "type": "boolean", "default": false }, "isAllowEditPostWhenReviewingEnabled": { "type": "boolean" }, "disallowNonMemberInteractInCommunity": { "type": "boolean" }, "allowJoinPrivateCommunity": { "type": "boolean", "default": false }, "globalFeed": { "type": "object", "properties": { "showOnlyMyFeed": { "type": "boolean", "default": false }, "showMyPost": { "type": "boolean" }, "showEveryonePost": { "type": "boolean" }, "showCommunityPost": { "type": "boolean" }, "showFollowingPost": { "type": "boolean" }, "maxGlobalPinnedPost": { "type": "number" } } }, "story": { "type": "object", "properties": { "expiryTimeMinutes": { "type": "integer", "minimum": 1, "maximum": 1440 }, "allowAllUserToCreateStory": { "type": "boolean", "default": false } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Get social configuration.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Get social configuration.\n", "responses": { "200": { "description": "Social configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "userPrivacySetting": { "type": "string", "enum": [ "public", "private" ] }, "membershipAcceptance": { "type": "string", "enum": [ "invitation", "automatic" ], "default": "automatic", "description": "Controls how users can join the network" }, "isFollowWithRequestEnabled": { "type": "boolean", "default": false }, "isAllowEditPostWhenReviewingEnabled": { "type": "boolean" }, "disallowNonMemberInteractInCommunity": { "type": "boolean" }, "allowJoinPrivateCommunity": { "type": "boolean", "default": false }, "globalFeed": { "type": "object", "properties": { "showOnlyMyFeed": { "type": "boolean", "default": false }, "showMyPost": { "type": "boolean" }, "showEveryonePost": { "type": "boolean" }, "showCommunityPost": { "type": "boolean" }, "showFollowingPost": { "type": "boolean" }, "maxGlobalPinnedPost": { "type": "number" } } }, "story": { "type": "object", "properties": { "expiryTimeMinutes": { "type": "integer", "minimum": 1, "maximum": 1440 }, "allowAllUserToCreateStory": { "type": "boolean", "default": false } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/semantic-search": { "put": { "summary": "Update Semantics search configuration.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Update Network setting for Semantics search.\n", "requestBody": { "description": "information for a network setting\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "postMinScore": { "type": "number", "minimum": 0, "maximum": 1 }, "communityMinScore": { "type": "number", "minimum": 0, "maximum": 1 } } } } } }, "responses": { "200": { "description": "Semantic Search configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "semanticSearch": { "type": "object", "properties": { "post": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": false }, "minScore": { "type": "number" } } }, "community": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": false }, "minScore": { "type": "number" } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Get Network setting for Semantics search.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Get Semantics search configuration.\n", "responses": { "200": { "description": "Semantic Search configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "semanticSearch": { "type": "object", "properties": { "post": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": false }, "minScore": { "type": "number" } } }, "community": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": false }, "minScore": { "type": "number" } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/users": { "get": { "tags": [ "Network Setting" ], "summary": "Get users configuration.", "description": "Get users configuration.", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Users configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "isAllowUpdateDisplayName": { "type": "boolean" }, "fallbackRole": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": false }, "roleIds": { "type": "array", "items": { "type": "string" }, "description": "This field is for fallback role IDs. If the user does not have any role, this role will be assigned to the user." } } } } } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "tags": [ "Network Setting" ], "summary": "Update users configuration", "description": "Update users configuration", "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "Information of a users to be updated.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "isAllowUpdateDisplayName": { "type": "boolean" }, "fallbackRoleIds": { "type": "array", "items": { "type": "string", "maxLength": 10 }, "description": "When fallback role is enabled, these roles will be assigned to users who don't have any role in the network." } } } } } }, "responses": { "200": { "description": "Users configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "isAllowUpdateDisplayName": { "type": "boolean" }, "fallbackRole": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": false }, "roleIds": { "type": "array", "items": { "type": "string" }, "description": "This field is for fallback role IDs. If the user does not have any role, this role will be assigned to the user." } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/public-users": { "get": { "tags": [ "Network Setting" ], "summary": "Get public users configuration.", "description": "Get public users configuration.", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Public users configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "visitorEnabled": { "type": "boolean", "description": "Enable or disable visitor users (users without authentication)" }, "botEnabled": { "type": "boolean", "description": "Enable or disable bot users" }, "secure": { "type": "boolean", "description": "Enable or disable secure mode for public users" } } } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "tags": [ "Network Setting" ], "summary": "Update public users configuration", "description": "Update public users configuration", "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "Information of public users to be updated.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "publicUserVisitorEnabled": { "type": "boolean" }, "publicUserBotEnabled": { "type": "boolean" }, "publicUserSecure": { "type": "boolean" } } } } } }, "responses": { "200": { "description": "Public users configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "visitorEnabled": { "type": "boolean", "description": "Enable or disable visitor users (users without authentication)" }, "botEnabled": { "type": "boolean", "description": "Enable or disable bot users" }, "secure": { "type": "boolean", "description": "Enable or disable secure mode for public users" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/video-streaming": { "get": { "summary": "Get video streaming setting check configuration.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Using for get network video streaming setting check configuration.\n", "responses": { "200": { "description": "Video Streaming setting check configuration", "content": { "application/json": { "schema": { "description": "Response for video streaming setting", "type": "object", "properties": { "enabled": { "type": "boolean", "description": "This field is for enabling or disabling the video streaming feature." }, "moderation": { "type": "object", "description": "This field is for moderation configuration.", "properties": { "enabled": { "type": "boolean", "description": "This field is for enabling or disabling the moderation feature." }, "categories": { "type": "array", "description": "This field is for list of moderation categories.", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "flagThreshold": { "type": "number", "description": "This field is for flag threshold.", "minimum": 0, "maximum": 1 }, "terminateThreshold": { "type": "number", "description": "This field is for terminate threshold.", "minimum": 0, "maximum": 1 } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "422": { "description": "Put a wrong request parameters.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters error.", "data": { "detail": [ "The 'data.text' field length must be less than or equal to 20000 characters long." ] } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "Update video streaming setting check configuration.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Update video streaming setting check configuration.\n", "requestBody": { "description": "information for a network setting\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "This field is for enabling or disabling the video streaming feature." }, "moderation": { "type": "object", "description": "This field is for moderation configuration.", "properties": { "enabled": { "type": "boolean", "description": "This field is for enabling or disabling the moderation feature." }, "categories": { "type": "array", "description": "This field is for list of moderation categories.", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "flagThreshold": { "type": "number", "description": "This field is for flag threshold.", "minimum": 0, "maximum": 1 }, "terminateThreshold": { "type": "number", "description": "This field is for terminate threshold.", "minimum": 0, "maximum": 1 } } } } } } } } } } }, "responses": { "200": { "description": "Video Streaming setting check configuration", "content": { "application/json": { "schema": { "description": "Response for video streaming setting", "type": "object", "properties": { "enabled": { "type": "boolean", "description": "This field is for enabling or disabling the video streaming feature." }, "moderation": { "type": "object", "description": "This field is for moderation configuration.", "properties": { "enabled": { "type": "boolean", "description": "This field is for enabling or disabling the moderation feature." }, "categories": { "type": "array", "description": "This field is for list of moderation categories.", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "flagThreshold": { "type": "number", "description": "This field is for flag threshold.", "minimum": 0, "maximum": 1 }, "terminateThreshold": { "type": "number", "description": "This field is for terminate threshold.", "minimum": 0, "maximum": 1 } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "422": { "description": "Put a wrong request parameters.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters error.", "data": { "detail": [ "The 'data.text' field length must be less than or equal to 20000 characters long." ] } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/room": { "get": { "summary": "Get room network setting configuration", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Get room network setting configuration.\n", "responses": { "200": { "description": "Room configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "roomSettings": { "type": "object", "properties": { "maxCoHostParticipants": { "type": "integer", "description": "Maximum number of co-host participants", "default": 2 }, "maxStreamingDurationHours": { "type": "number", "description": "Maximum streaming duration in hours", "default": 6 } } } }, "example": { "roomSettings": { "maxCoHostParticipants": 2, "maxStreamingDurationHours": 6 } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/webhook": { "put": { "summary": "Update webhook configuration.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Update webhook configuration.\n", "requestBody": { "description": "information for a network setting\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "webhookEnabled": { "type": "boolean", "description": "`true` - User can register webhook for network and will receive a webhook.\n`false` - User won't be able to register webhook and won't receive a webhook.\n" } } } } } }, "responses": { "200": { "description": "Webhook configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Get webhook configuration.", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Get webhook configuration.\n", "responses": { "200": { "description": "Webhook configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/uikit": { "get": { "summary": "Get UIKit config", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Get UIKit config in json format, will return empty config (`{}`) if we have not set the config yet.\n", "responses": { "200": { "description": "UIKit configuration", "content": { "application/json": { "schema": { "description": "UIKit config json", "type": "object" }, "example": { "config": { "preferred_theme": "default", "theme": { "light": { "primary_color": "#1054DF", "secondary_color": "#292B32", "base_color": "#292B32", "base_shade1_color": "#636878", "base_shade2_color": "#898E9E", "base_shade3_color": "#A5A9b5", "base_shade4_color": "#EBECEF", "alert_color": "#FA4D30", "background_color": "#FFFFFF", "base_inverse_color": "#000000", "background_shade1_color": "#F6F7F8", "highlight_color": "#1054DE" }, "dark": { "primary_color": "#1054DE", "secondary_color": "#292B32", "base_color": "#EBECEF", "base_shade1_color": "#A5A9B5", "base_shade2_color": "#6E7487", "base_shade3_color": "#40434E", "base_shade4_color": "#292B32", "alert_color": "#FA4D30", "background_color": "#191919", "base_inverse_color": "#FFFFFF", "background_shade1_color": "#40434E", "highlight_color": "#1054DE" } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "Update UIKit config", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Update or create a UIKit config for a network.\nOnly admin is allowed to call this.\n", "requestBody": { "description": "UIKit config in json", "required": true, "content": { "application/json": { "schema": { "type": "object" }, "example": { "config": { "preferred_theme": "default", "theme": { "light": { "primary_color": "#1054DF", "secondary_color": "#292B32", "base_color": "#292B32", "base_shade1_color": "#636878", "base_shade2_color": "#898E9E", "base_shade3_color": "#A5A9b5", "base_shade4_color": "#EBECEF", "alert_color": "#FA4D30", "background_color": "#FFFFFF", "base_inverse_color": "#000000", "background_shade1_color": "#F6F7F8", "highlight_color": "#1054DE" }, "dark": { "primary_color": "#1054DE", "secondary_color": "#292B32", "base_color": "#EBECEF", "base_shade1_color": "#A5A9B5", "base_shade2_color": "#6E7487", "base_shade3_color": "#40434E", "base_shade4_color": "#292B32", "alert_color": "#FA4D30", "background_color": "#191919", "base_inverse_color": "#FFFFFF", "background_shade1_color": "#40434E", "highlight_color": "#1054DE" } } } } } } }, "responses": { "200": { "description": "UIKit configuration", "content": { "application/json": { "schema": { "description": "UIKit config json", "type": "object" }, "example": { "config": { "preferred_theme": "default", "theme": { "light": { "primary_color": "#1054DF", "secondary_color": "#292B32", "base_color": "#292B32", "base_shade1_color": "#636878", "base_shade2_color": "#898E9E", "base_shade3_color": "#A5A9b5", "base_shade4_color": "#EBECEF", "alert_color": "#FA4D30", "background_color": "#FFFFFF", "base_inverse_color": "#000000", "background_shade1_color": "#F6F7F8", "highlight_color": "#1054DE" }, "dark": { "primary_color": "#1054DE", "secondary_color": "#292B32", "base_color": "#EBECEF", "base_shade1_color": "#A5A9B5", "base_shade2_color": "#6E7487", "base_shade3_color": "#40434E", "base_shade4_color": "#292B32", "alert_color": "#FA4D30", "background_color": "#191919", "base_inverse_color": "#FFFFFF", "background_shade1_color": "#40434E", "highlight_color": "#1054DE" } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/shareable-deep-links": { "put": { "summary": "Create shareable deep links configuration", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Create or update shareable deep links configuration with domain and path patterns.\n", "requestBody": { "description": "Configuration for shareable deep links", "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "domain", "patterns" ], "properties": { "domain": { "type": "string", "maxLength": 100, "description": "The domain for the shareable deep links", "example": "myapp.com" }, "patterns": { "type": "object", "properties": { "posts": { "type": "string", "maxLength": 100, "description": "URL path for posts, {postId} is required (e.g., /posts/{postId})", "example": "/posts/{postId}" }, "communities": { "type": "string", "maxLength": 100, "description": "URL path for communities, {communityId} is required (e.g., /communities/{communityId})", "example": "/communities/{communityId}" }, "users": { "type": "string", "maxLength": 100, "description": "URL path for users, {userId} is required (e.g., /users/{userId})", "example": "/users/{userId}" }, "livestreams": { "type": "string", "maxLength": 100, "description": "URL path for livestreams, {livestreamId} is required (e.g., /livestreams/{livestreamId})", "example": "/livestreams/{livestreamId}" } } } } } } } }, "responses": { "200": { "description": "Shareable deep links configuration", "content": { "application/json": { "schema": { "type": "object", "required": [ "domain", "patterns" ], "properties": { "domain": { "type": "string", "maxLength": 100, "description": "The domain for the shareable deep links", "example": "myapp.com" }, "patterns": { "type": "object", "properties": { "posts": { "type": "string", "maxLength": 100, "description": "URL path for posts, {postId} is required (e.g., /posts/{postId})", "example": "/posts/{postId}" }, "communities": { "type": "string", "maxLength": 100, "description": "URL path for communities, {communityId} is required (e.g., /communities/{communityId})", "example": "/communities/{communityId}" }, "users": { "type": "string", "maxLength": 100, "description": "URL path for users, {userId} is required (e.g., /users/{userId})", "example": "/users/{userId}" }, "livestreams": { "type": "string", "maxLength": 100, "description": "URL path for livestreams, {livestreamId} is required (e.g., /livestreams/{livestreamId})", "example": "/livestreams/{livestreamId}" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Get shareable deep links configuration", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Get shareable deep links configuration.\n", "responses": { "200": { "description": "Shareable deep links configuration", "content": { "application/json": { "schema": { "type": "object", "required": [ "domain", "patterns" ], "properties": { "domain": { "type": "string", "maxLength": 100, "description": "The domain for the shareable deep links", "example": "myapp.com" }, "patterns": { "type": "object", "properties": { "posts": { "type": "string", "maxLength": 100, "description": "URL path for posts, {postId} is required (e.g., /posts/{postId})", "example": "/posts/{postId}" }, "communities": { "type": "string", "maxLength": 100, "description": "URL path for communities, {communityId} is required (e.g., /communities/{communityId})", "example": "/communities/{communityId}" }, "users": { "type": "string", "maxLength": 100, "description": "URL path for users, {userId} is required (e.g., /users/{userId})", "example": "/users/{userId}" }, "livestreams": { "type": "string", "maxLength": 100, "description": "URL path for livestreams, {livestreamId} is required (e.g., /livestreams/{livestreamId})", "example": "/livestreams/{livestreamId}" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/security-configs": { "put": { "summary": "Update network security configuration", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Create or update security configuration for server key and admin token settings.\n", "requestBody": { "description": "Configuration for security settings", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "serverKey": { "type": "object", "properties": { "expiresInHours": { "type": "number", "minimum": 1, "maximum": 1000, "description": "Server key expiration time in hours" }, "apiScopeEnabled": { "type": "boolean", "description": "Enable API scope for server key" } }, "required": [ "apiScopeEnabled" ] }, "adminToken": { "type": "object", "properties": { "expiresInHours": { "type": "number", "minimum": 1, "maximum": 1000, "description": "Admin token expiration time in hours" } } } }, "anyOf": [ { "required": [ "serverKey" ] }, { "required": [ "adminToken" ] } ] } } } }, "responses": { "200": { "description": "Security configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "securityConfigs": { "type": "object", "properties": { "serverKey": { "type": "object", "properties": { "expiresInHours": { "type": "number", "description": "Server key expiration time in hours" }, "apiScopeEnabled": { "type": "boolean", "description": "Whether API scope is enabled for server key" } } }, "adminToken": { "type": "object", "properties": { "expiresInHours": { "type": "number", "description": "Admin token expiration time in hours" } } } } } }, "example": { "securityConfigs": { "serverKey": { "expiresInHours": 168, "apiScopeEnabled": true }, "adminToken": { "expiresInHours": 24 } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Get network security configuration", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Get security configuration for server key and admin token settings.\n", "responses": { "200": { "description": "Security configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "securityConfigs": { "type": "object", "properties": { "serverKey": { "type": "object", "properties": { "expiresInHours": { "type": "number", "description": "Server key expiration time in hours" }, "apiScopeEnabled": { "type": "boolean", "description": "Whether API scope is enabled for server key" } } }, "adminToken": { "type": "object", "properties": { "expiresInHours": { "type": "number", "description": "Admin token expiration time in hours" } } } } } }, "example": { "securityConfigs": { "serverKey": { "expiresInHours": 168, "apiScopeEnabled": true }, "adminToken": { "expiresInHours": 24 } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/push-notification": { "put": { "summary": "Update push notification configuration", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Update push notification settings for iOS mutable content and live streaming notifications.\n", "requestBody": { "description": "Information for push notification network setting", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "iOSMutableContent": { "type": "boolean", "description": "Enable or disable iOS mutable content for push notifications" }, "notifyWhenLiveStart": { "type": "boolean", "default": true, "description": "Whether to immedieatly sent a push notification when the stream is started (true), or sent a push notificaiton when the stream is attached to a post (false)" } } } } } }, "responses": { "200": { "description": "Push notification configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "iOSMutableContent": { "type": "boolean", "description": "Enable or disable iOS mutable content for push notifications" }, "notifyWhenLiveStart": { "type": "boolean", "description": "Whether to immedieatly sent a push notification when the stream is started (true), or sent a push notificaiton when the stream is attached to a post (false)" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Get push notification configuration", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Get push notification settings for iOS mutable content and live streaming notifications.\n", "responses": { "200": { "description": "Push notification configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "iOSMutableContent": { "type": "boolean", "description": "Enable or disable iOS mutable content for push notifications" }, "notifyWhenLiveStart": { "type": "boolean", "description": "Whether to immedieatly sent a push notification when the stream is started (true), or sent a push notificaiton when the stream is attached to a post (false)" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/network-settings/product": { "get": { "summary": "Get product configuration", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Get product catalogue configuration settings.\n\n**Access Control:**\n- All authenticated users can view product settings\n- Visitors and bots have read-only access\n", "responses": { "200": { "description": "Product catalogue configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "product": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Whether the product catalogue feature is enabled" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "Update product configuration", "tags": [ "Network Setting" ], "security": [ { "BearerAuth": [] } ], "description": "Update product catalogue configuration settings.\n\n**Access Control:**\n- Requires admin permissions\n", "requestBody": { "description": "Information for product catalogue network setting", "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "enabled" ], "properties": { "enabled": { "type": "boolean", "description": "Enable or disable the product catalogue feature" } } } } } }, "responses": { "200": { "description": "Product catalogue configuration", "content": { "application/json": { "schema": { "type": "object", "properties": { "product": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Whether the product catalogue feature is enabled" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/v1/notification": { "post": { "summary": "register a device to get push notification", "tags": [ "Notification" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Register a device to a notification service provider.\n", "requestBody": { "description": "Information required to register a device for push notifications", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "deviceId": { "type": "string", "maxLength": 150, "description": "Unique identifier for the device" }, "platform": { "type": "string", "enum": [ "android", "ios" ], "description": "Operating system platform of the device" }, "token": { "type": "string", "description": "Device token for push notification. For iOS, token must be ≤ 400 characters and in hexadecimal format", "maxLength": 1000 }, "userId": { "type": "string", "description": "Identifier of the user associated with this device" }, "provider": { "type": "string", "description": "Push notification service provider" } }, "required": [ "deviceId", "platform", "token", "userId" ] } } } }, "responses": { "200": { "description": "Success response.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 404, "message": "Resource Not Found." } } } } } }, "delete": { "summary": "unregister a device from a notification service provider", "tags": [ "Notification" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Unregister a device from a notification service provider.\n", "parameters": [ { "name": "userId", "description": "user id", "in": "query", "schema": { "type": "string", "minLength": 1 }, "deprecated": true }, { "name": "deviceId", "description": "device id", "in": "query", "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Success response.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 404, "message": "Resource Not Found." } } } } } } }, "/api/v1/notification-tray": { "get": { "summary": "Get user's notification tray items", "tags": [ "Notification Tray" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "options", "description": "Pagination options for controlling result set size and navigation", "in": "query", "required": false, "schema": { "type": "object", "properties": { "token": { "type": "string", "description": "Token for pagination to retrieve the next or previous page of results" }, "limit": { "type": "integer", "description": "Maximum number of items to return per page", "minimum": 1, "maximum": 100, "default": 20 } } } } ], "description": " Retrieves the user's notification tray items, sorted by newest first.\n - Notification tray items will be updated shortly after calling related APIs (e.g. `POST api/v4/posts`) but are not real-time.\n - The results are cached for 30 seconds, meaning updates for new events and `lastSeenAt` time may take up to 30 seconds to reflect", "responses": { "200": { "description": "Response containing a list of notification tray items and associated data", "content": { "application/json": { "schema": { "type": "object", "required": [ "notificationTrayItems", "users" ], "properties": { "notificationTrayItems": { "type": "array", "description": "List of notification items to display", "items": { "type": "object", "description": "Represents a single notification item in the notification tray", "required": [ "_id", "lastOccurredAt", "lastSeenAt", "actors", "actorsCount", "actionType", "targetId", "targetType", "text", "templatedText", "daySegment" ], "properties": { "_id": { "type": "string", "description": "Unique identifier of the notification tray item" }, "daySegment": { "type": "string", "format": "date-time", "description": "Timestamp indicating which day this notification belongs to for grouping purposes" }, "lastSeenAt": { "type": "string", "format": "date-time", "description": "Timestamp when the user last saw this notification" }, "lastOccurredAt": { "type": "string", "format": "date-time", "description": "Timestamp when the notification last occurred" }, "actors": { "type": "array", "description": "List of users who performed the action (limited to 3 most recent)", "items": { "type": "object", "description": "Represents a user who performed an action that triggered a notification", "properties": { "_id": { "type": "string", "description": "Unique identifier of the actor" }, "publicId": { "type": "string", "description": "Public identifier of the actor" }, "lastActedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the actor last performed the action" } } } }, "actorsCount": { "type": "integer", "description": "Total count of actors who performed the action" }, "actionType": { "type": "string", "description": "Type of action that triggered the notification", "enum": [ "post", "poll", "comment", "reaction", "mention", "reply", "follow" ] }, "trayItemCategory": { "type": "string", "description": "More specific category for certain action types", "enum": [ "mention_in_poll", "mention_in_post", "mention_in_comment", "mention_in_reply", "reaction_on_post", "reaction_on_poll", "reaction_on_comment", "reaction_on_reply", "follow" ] }, "targetId": { "type": "string", "description": "Identifier of the content being acted upon" }, "targetType": { "type": "string", "description": "Type of content being acted upon" }, "referenceId": { "type": "string", "description": "Optional identifier of related content for context" }, "referenceType": { "type": "string", "description": "Optional type of the referenced content" }, "actionReferenceId": { "type": "string", "description": "Optional identifier of the specific action object" }, "parentId": { "type": "string", "description": "Optional identifier of parent content" }, "data": { "deprecated": true, "oneOf": [ { "type": "object", "required": [ "communityName" ], "properties": { "communityName": { "type": "string", "description": "Name of the community where the action occurred" } } }, { "type": "object", "required": [ "reactionName" ], "properties": { "reactionName": { "type": "array", "items": { "type": "string" }, "description": "List of reaction names used" } } } ] }, "text": { "type": "string", "description": "Human-readable notification text", "example": "Alice and 4 others reacted to a comment on their feed" }, "templatedText": { "type": "string", "description": "Notification text with template variables for client-side processing, where template variables will be {{ userId: ... }}, {{ communityId: ...}} and {{ text: ... }}", "example": "{{ userId: AlicePublicId }} and {{ text: 4 others }} reacted to a comment on their feed" } } } }, "paging": { "type": "object", "description": "Pagination information for navigating through results", "required": [ "limit" ], "properties": { "next": { "type": "string", "description": "Token to retrieve the next page of results" }, "previous": { "type": "string", "description": "Token to retrieve the previous page of results" }, "limit": { "type": "number", "description": "Number of items per page" } } }, "users": { "type": "array", "description": "User information for actors referenced in the notifications", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "description": "File information for any media referenced in notifications", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "422": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400, "message": "Bad Request." } } } } } } }, "/api/v1/notification-tray/tray/seen": { "get": { "summary": "Get notification tray seen status", "tags": [ "Notification Tray" ], "security": [ { "BearerAuth": [] } ], "description": "Retrieves timestamps for when the user last viewed their notification tray and when the most recent notification occurred", "responses": { "200": { "description": "Response containing the user's notification tray seen timestamps", "content": { "application/json": { "schema": { "type": "object", "required": [ "lastTraySeenAt", "lastTrayOccurredAt" ], "properties": { "lastTraySeenAt": { "type": "string", "format": "date-time", "description": "Timestamp when the user last viewed their notification tray" }, "lastTrayOccurredAt": { "type": "string", "format": "date-time", "description": "Timestamp of the most recent notification in the tray" } } } } } }, "422": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400, "message": "Bad Request." } } } } } }, "post": { "summary": "Mark all notifications as seen", "tags": [ "Notification Tray" ], "security": [ { "BearerAuth": [] } ], "description": "Updates the seen status for the user's notification tray", "requestBody": { "description": "Request to mark all notifications as seen", "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "lastSeenAt" ], "properties": { "lastSeenAt": { "type": "string", "format": "date-time", "description": "Timestamp to mark as last seen for all notifications (should not exceed server time by more than 10 seconds)" } } } } } }, "responses": { "200": { "description": "Response after successfully marking all notifications as seen", "content": { "application/json": { "schema": { "type": "object", "required": [ "lastSeenAt" ], "properties": { "lastSeenAt": { "type": "string", "format": "date-time", "description": "Updated timestamp for when all notifications were marked as seen" } } } } } }, "422": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400, "message": "Bad Request." } } } } } } }, "/api/v1/notification-tray/items/seen": { "post": { "summary": "Mark specific notifications as seen", "tags": [ "Notification Tray" ], "security": [ { "BearerAuth": [] } ], "description": "Updates the seen status for specific notification items in the user's notification tray", "requestBody": { "description": "Request to mark specific notification items as seen", "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "trayItems" ], "properties": { "trayItems": { "type": "array", "description": "List of notification items to mark as seen", "items": { "type": "object", "required": [ "id", "lastSeenAt" ], "properties": { "id": { "type": "string", "description": "Identifier of the notification tray item" }, "lastSeenAt": { "type": "string", "format": "date-time", "description": "Timestamp to mark as last seen for this item (should not exceed server time by more than 10 seconds)" } } } } } } } } }, "responses": { "200": { "description": "Response after successfully marking specific notifications as seen", "content": { "application/json": { "schema": { "type": "object", "required": [ "trayItems" ], "properties": { "trayItems": { "type": "array", "description": "List of updated notification items with their new seen status", "items": { "type": "object", "required": [ "id", "lastSeenAt" ], "properties": { "id": { "type": "string", "description": "Identifier of the notification item" }, "lastSeenAt": { "type": "string", "format": "date-time", "description": "Updated timestamp when the notification was marked as seen" } } } } } } } } }, "422": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400, "message": "Bad Request." } } } } } } }, "/api/v3/notification/setting": { "get": { "summary": "Get push notification setting.", "tags": [ "Notification" ], "security": [ { "BearerAuth": [] } ], "description": "Get push notification setting.\n", "parameters": [ { "name": "level", "required": true, "in": "query", "schema": { "type": "string", "enum": [ "user", "channel", "community" ] } }, { "name": "channelId", "in": "query", "schema": { "type": "string", "minLength": 1, "maxLength": 900 } }, { "name": "communityId", "in": "query", "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "responses": { "200": { "description": "Notification Setting Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "isPushNotifiable": { "type": "boolean", "description": "on/off notification" }, "isUserEnabled": { "type": "boolean", "description": "enable/disable notification from user level(for community level)" }, "notifiableEvents": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "enum": [ "channel.created", "channel.joined", "conversation-channel.joined", "text-mention-message.created", "message.created", "conversation-message.created", "conversation-text-message.created", "conversation-image-message.created", "conversation-file-message.created", "post.created", "post.approved", "post.need-reviewing", "text-mention-post.created", "text-mention-user-feed-post.created", "video-streaming-post.created", "post.reacted", "comment.created", "text-mention-comment.created", "text-mention-user-feed-comment.created", "comment.replied", "text-mention-comment.replied", "text-mention-user-feed-comment.replied", "comment.reacted", "follow.created", "follow.requested", "follow.accepted", "community.roleAdded", "community.updated", "story.created", "story-comment.created", "video-streaming.didStart" ] }, "moduleName": { "type": "string", "enum": [ "chat", "video-streaming", "social" ] }, "eventName": { "type": "string" }, "isPushNotifiable": { "type": "boolean", "description": "on/off notification of event" }, "parameters": { "type": "array", "items": { "type": "string" }, "description": "place holders" }, "titleTemplate": { "type": "string", "description": "title of template" }, "bodyTemplate": { "type": "string", "description": "body of template" }, "listenFromRoleIds": { "type": "array", "items": { "type": "string" }, "description": "specific roles for get notify by event creator who has roles only" }, "ignoreFromRoleIds": { "type": "array", "items": { "type": "string" }, "description": "specific roles for ignore notify by event creator who has roles only" }, "isNetworkEnabled": { "type": "boolean", "description": "enable/disable notification from network level(for community level)" } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "Save push notification setting.", "tags": [ "Notification" ], "security": [ { "BearerAuth": [] } ], "description": "Save push notification setting.\n", "requestBody": { "description": "Notification setting information to be updated\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "level": { "type": "string", "enum": [ "user", "channel", "community" ], "description": "level:\n * `user` - need to specific modules via notifiableEvents.\n * `channel` - need to specific channelId.\n * `community` - need to specific communityId and community event via notifiableEvents.\n" }, "isPushNotifiable": { "type": "boolean" }, "channelId": { "type": "string", "minLength": 1, "maxLength": 900 }, "communityId": { "type": "string", "minLength": 1, "maxLength": 900 }, "notifiableEvents": { "type": "array", "minItems": 1, "maxItems": 7, "items": { "type": "object", "properties": { "name": { "type": "string", "enum": [ "channel.created", "channel.joined", "conversation-channel.joined", "text-mention-message.created", "message.created", "conversation-message.created", "conversation-text-message.created", "conversation-image-message.created", "conversation-file-message.created", "post.created", "post.approved", "post.need-reviewing", "text-mention-post.created", "text-mention-user-feed-post.created", "video-streaming-post.created", "post.reacted", "comment.created", "text-mention-comment.created", "text-mention-user-feed-comment.created", "comment.replied", "text-mention-comment.replied", "text-mention-user-feed-comment.replied", "comment.reacted", "follow.created", "follow.requested", "follow.accepted", "community.roleAdded", "community.updated", "video-streaming.didStart" ] }, "moduleName": { "type": "string", "enum": [ "chat", "video-streaming", "social" ] }, "isPushNotifiable": { "type": "boolean" }, "titleTemplate": { "type": "string", "maxLength": 1000 }, "bodyTemplate": { "type": "string", "maxLength": 5000 }, "listenFromRoleIds": { "type": "array", "maxItems": 10, "items": { "type": "string", "minLength": 1, "maxLength": 900 }, "description": "specific roles for get notify by event creator who has roles only" }, "ignoreFromRoleIds": { "type": "array", "maxItems": 10, "items": { "type": "string", "minLength": 1, "maxLength": 900 }, "description": "specific roles for ignore notify by event creator who has roles only" } } } } }, "required": [ "level" ] } } } }, "responses": { "200": { "description": "save information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" } } }, "example": { "status": "success" } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/pinned-posts/communities/{communityId}": { "get": { "summary": "List all pinned posts in a community", "tags": [ "Pin post" ], "security": [ { "BearerAuth": [] } ], "description": "List all pinned posts in a community\n", "parameters": [ { "name": "communityId", "required": true, "in": "path", "schema": { "type": "string", "maxLength": 900 } }, { "name": "options", "in": "query", "schema": { "type": "object", "properties": { "sortBy": { "type": "string", "default": "createdAt", "enum": [ "createdAt" ] }, "orderBy": { "type": "string", "default": "desc", "enum": [ "asc", "desc" ] } } } } ], "responses": { "200": { "description": "Pin Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "pinTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Id of target. (postId or messageFeedId or networkId )" }, "targetType": { "type": "string", "description": "type of target. (community or messageFeed or network)" }, "lastPinsUpdatedAt": { "type": "string", "description": "Latest date/time when pinned content is updated.", "format": "date-time" } } } }, "pins": { "type": "array", "items": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "Id of content. (post or messageFeed or network)" }, "referenceType": { "type": "string", "description": "type of content. (post or or messageFeed or network)" }, "placement": { "type": "string", "description": "type of pin. (default or announcement or global)" }, "pinnedBy": { "type": "string", "description": "user id who pinned the content." }, "pinnedAt": { "type": "string", "description": "The date/time when a content is pinned.", "format": "date-time" } } } }, "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "403": { "description": "No permission to query pin post in a community", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Private community and the user is not a member": { "value": { "status": "error", "code": 400300, "message": "You are not a member of this community" } } } } } }, "404": { "description": "The communityId is not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "The communityId is not found": { "value": { "status": "error", "code": 400400, "message": "CommunityId ${id} not found" } } } } } }, "422": { "description": "Parameters validation error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Clear all pin posts in a community", "tags": [ "Pin post" ], "security": [ { "BearerAuth": [] } ], "description": "Clear all pin posts in a community\n", "parameters": [ { "name": "communityId", "required": true, "in": "path", "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "403": { "description": "No permission to clear all pin post in a community", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Users do not have permission.": { "value": { "status": "error", "code": 400300, "message": "You are not allowed to do this" } } } } } }, "404": { "description": "The communityId is not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "The communityId is not found": { "value": { "status": "error", "code": 400400, "message": "CommunityId ${id} not found" } } } } } }, "422": { "description": "Parameters validation error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/pinned-posts/communities/{communityId}/{placement}": { "get": { "summary": "List all pinned posts in a community by placement", "tags": [ "Pin post" ], "security": [ { "BearerAuth": [] } ], "description": "List all pinned posts in a community by placement\n", "parameters": [ { "name": "communityId", "required": true, "in": "path", "schema": { "type": "string", "maxLength": 900 } }, { "name": "placement", "required": true, "in": "path", "schema": { "type": "string", "enum": [ "default", "announcement" ] } }, { "name": "options", "in": "query", "schema": { "type": "object", "properties": { "sortBy": { "type": "string", "default": "createdAt", "enum": [ "createdAt" ] }, "orderBy": { "type": "string", "default": "desc", "enum": [ "asc", "desc" ] } } } } ], "responses": { "200": { "description": "Pin Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "pinTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Id of target. (postId or messageFeedId or networkId )" }, "targetType": { "type": "string", "description": "type of target. (community or messageFeed or network)" }, "lastPinsUpdatedAt": { "type": "string", "description": "Latest date/time when pinned content is updated.", "format": "date-time" } } } }, "pins": { "type": "array", "items": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "Id of content. (post or messageFeed or network)" }, "referenceType": { "type": "string", "description": "type of content. (post or or messageFeed or network)" }, "placement": { "type": "string", "description": "type of pin. (default or announcement or global)" }, "pinnedBy": { "type": "string", "description": "user id who pinned the content." }, "pinnedAt": { "type": "string", "description": "The date/time when a content is pinned.", "format": "date-time" } } } }, "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "403": { "description": "No permission to query pin post in a community", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Users do not have permission.": { "value": { "status": "error", "code": 400300, "message": "You are not a member of this community" } } } } } }, "404": { "description": "The communityId is not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "The communityId is not found": { "value": { "status": "error", "code": 400400, "message": "CommunityId ${id} not found" } } } } } }, "422": { "description": "Parameters validation error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Clear all pin posts in a community by placement", "tags": [ "Pin post" ], "security": [ { "BearerAuth": [] } ], "description": "Clear all pin posts in a community by placement\n", "parameters": [ { "name": "communityId", "required": true, "in": "path", "schema": { "type": "string", "maxLength": 900 } }, { "name": "placement", "required": true, "in": "path", "schema": { "type": "string", "enum": [ "default", "announcement" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "403": { "description": "No permission to clear all pin post in a community", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Users do not have permission.": { "value": { "status": "error", "code": 400300, "message": "You are not allowed to do this" } } } } } }, "404": { "description": "The communityId is not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "The communityId is not found": { "value": { "status": "error", "code": 400400, "message": "CommunityId ${id} not found" } } } } } }, "422": { "description": "Parameters validation error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/pinned-posts/communities/{communityId}/{placement}/{postId}": { "post": { "summary": "Pin a post in a community ", "tags": [ "Pin post" ], "security": [ { "BearerAuth": [] } ], "description": "Pin a post in a community\n", "parameters": [ { "name": "communityId", "required": true, "in": "path", "schema": { "type": "string", "maxLength": 900 } }, { "name": "placement", "required": true, "in": "path", "schema": { "type": "string", "enum": [ "default", "announcement" ] } }, { "name": "postId", "required": true, "in": "path", "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "Pin Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "pinTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Id of target. (postId or messageFeedId or networkId )" }, "targetType": { "type": "string", "description": "type of target. (community or messageFeed or network)" }, "lastPinsUpdatedAt": { "type": "string", "description": "Latest date/time when pinned content is updated.", "format": "date-time" } } } }, "pins": { "type": "array", "items": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "Id of content. (post or messageFeed or network)" }, "referenceType": { "type": "string", "description": "type of content. (post or or messageFeed or network)" }, "placement": { "type": "string", "description": "type of pin. (default or announcement or global)" }, "pinnedBy": { "type": "string", "description": "user id who pinned the content." }, "pinnedAt": { "type": "string", "description": "The date/time when a content is pinned.", "format": "date-time" } } } }, "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "badRequest Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "This post is already pinned.": { "value": { "status": "error", "code": 400000, "message": "Post ${postId} is already pinned" } }, "This post is not in community": { "value": { "status": "error", "code": 400000, "message": "Post ${postId} is not in community" } }, "This post is not in public community": { "value": { "status": "error", "code": 400000, "message": "Post ${postId} is not in public community" } }, "This post is not approved": { "value": { "status": "error", "code": 400000, "message": "Post ${postId} has to be approved" } }, "This post is deleted": { "value": { "status": "error", "code": 400000, "message": "Post ${postId} is deleted" } }, "Unable to pin child post ": { "value": { "status": "error", "code": 400000, "message": "Unable to pin child post" } }, "Pin post exceed the limit": { "value": { "status": "error", "code": 400000, "message": "Pin post by placement: ${placement} exceed the limit" } } } } } }, "403": { "description": "No permission to pin post in a community", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Users do not have permission.": { "value": { "status": "error", "code": 400300, "message": "You are not allowed to do this" } } } } } }, "404": { "description": "The communityId is not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "The communityId is not found": { "value": { "status": "error", "code": 400400, "message": "Failed to find community: ${communityId}" } }, "The postId is not found within the communityId": { "value": { "status": "error", "code": 400400, "message": "PostId ${postId} not found" } } } } } }, "422": { "description": "Parameters validation error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Unpin a post in a community ", "tags": [ "Pin post" ], "security": [ { "BearerAuth": [] } ], "description": "Unpin a post in a community\n", "parameters": [ { "name": "communityId", "required": true, "in": "path", "schema": { "type": "string", "maxLength": 900 } }, { "name": "placement", "required": true, "in": "path", "schema": { "type": "string", "enum": [ "default", "announcement" ] } }, { "name": "postId", "required": true, "in": "path", "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "Pin Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "pinTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Id of target. (postId or messageFeedId or networkId )" }, "targetType": { "type": "string", "description": "type of target. (community or messageFeed or network)" }, "lastPinsUpdatedAt": { "type": "string", "description": "Latest date/time when pinned content is updated.", "format": "date-time" } } } }, "pins": { "type": "array", "items": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "Id of content. (post or messageFeed or network)" }, "referenceType": { "type": "string", "description": "type of content. (post or or messageFeed or network)" }, "placement": { "type": "string", "description": "type of pin. (default or announcement or global)" }, "pinnedBy": { "type": "string", "description": "user id who pinned the content." }, "pinnedAt": { "type": "string", "description": "The date/time when a content is pinned.", "format": "date-time" } } } }, "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "badRequest Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "This post is not pinned.": { "value": { "status": "error", "code": 400000, "message": "Post ${postId} is not pinned" } }, "This post is not in community": { "value": { "status": "error", "code": 400000, "message": "Post ${postId} is not in community" } } } } } }, "403": { "description": "No permission to unpin post in a community", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Users do not have permission.": { "value": { "status": "error", "code": 400300, "message": "You are not allowed to do this" } } } } } }, "404": { "description": "The communityId is not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "The communityId is not found": { "value": { "status": "error", "code": 400400, "message": "Failed to find community: ${communityId}" } }, "The postId is not found within the communityId": { "value": { "status": "error", "code": 400400, "message": "PostId ${postId} not found" } } } } } }, "422": { "description": "Parameters validation error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/posts/schedule": { "post": { "tags": [ "Post" ], "summary": "Create a scheduled post", "description": "Create a new scheduled post for the authenticated user", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "scheduledAt", "postData" ], "properties": { "scheduledAt": { "type": "string", "format": "date-time", "description": "When the post should be published", "example": "2025-08-15T10:00:00Z" }, "postData": { "type": "object", "properties": { "data": { "type": "object", "description": "Body of a post", "properties": { "title": { "type": "string", "maxLength": 150, "description": "Title of a post." }, "text": { "type": "string", "maxLength": 50000, "description": "Text content of the post.", "example": "example text" }, "fileId": { "type": "string", "maxLength": 100, "description": "File ID for image/file post.", "example": "57b916d38eaf8010caddfb7759a2d06c" }, "pollId": { "type": "string", "maxLength": 100, "description": "Poll ID for create poll post.", "example": "53a9fd8b5aaa1af6c5a1bbd245ce4a9b1627373735551" }, "streamId": { "type": "string", "maxLength": 100, "description": "Video streaming ID for create live streaming post.", "example": "81559bcc3a5bb3b6bbd69a83b89d337e" }, "roomId": { "type": "string", "maxLength": 100, "description": "Room ID for room post." } } }, "attachments": { "type": "array", "maxItems": 10, "description": "Array of attachments.", "items": { "type": "object", "description": "Attachment info", "required": [ "fileId", "type" ], "properties": { "fileId": { "type": "string", "maxLength": 100, "example": "57b916d38eaf8010caddfb7759a2d06c", "description": "File ID for attachment." }, "type": { "type": "string", "description": "Attachment type.", "enum": [ "image", "file", "video" ] }, "displayMode": { "type": "string", "enum": [ "fill", "fit" ], "default": "fit", "description": "Display mode for the clip.", "example": "fit" }, "isMuted": { "type": "boolean", "default": false, "description": "Whether the video should be muted or not.", "example": false } } } }, "dataType": { "type": "string", "example": "upstra.customtype", "description": "Accept \"liveStream\", \"poll\", \"room\" or Custom type. Custom type must be in dot separated string format or system defined format (ex. \"some.customtype\", \"com.foo.bar\")." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "default": "user", "description": "Where to create post to (default: user)." }, "targetId": { "type": "string", "maxLength": 900, "example": "public_user_id", "description": "Resource public ID depends on target type (ex. target type is community, target ID will be community public ID)." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields.", "example": { "anything": "you want" } }, "links": { "type": "array", "maxItems": 100, "description": "Array of URL links extracted from content with metadata for link preview rendering", "items": { "type": "object", "required": [ "url" ], "properties": { "index": { "type": "number", "minimum": 0, "description": "Starting position of the URL in the original text content" }, "length": { "type": "number", "minimum": 1, "description": "Length of the URL string in the original text content" }, "url": { "type": "string", "maximum": 2000, "description": "The complete URL found in the content" }, "renderPreview": { "type": "boolean", "default": false, "description": "Flag indicating whether to render a rich preview for this link" }, "domain": { "type": "string", "maximum": 2000, "description": "Domain name extracted from the URL (e.g., 'example.com')" }, "title": { "type": "string", "maximum": 2000, "description": "Title of the linked page, typically extracted from Open Graph or meta tags" }, "imageUrl": { "type": "string", "maximum": 2000, "description": "URL of the preview image for the link, typically extracted from Open Graph tags" } } } }, "postId": { "type": "string", "maxLength": 900, "example": "postidiwant", "description": "For specify public post ID on post creation." }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "description": "Tags for the post", "items": { "type": "string", "maxLength": 24, "description": "Tag string" } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "description": "Hashtags for the post", "items": { "type": "string", "maxLength": 100, "example": "tech_news" }, "example": [ "tech_news", "startup_life", "product_launch", "innovation_2025" ] }, "mentionees": { "type": "array", "maxItems": 2, "description": "The object of the mentions type and user who get a notification from the post (optional, max 2 items).", "items": { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "example": "user", "description": "Type: * `user` - need to specify userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "example": [ "userId1", "userId2" ], "description": "Array of UserId (required if type is 'user').", "items": { "type": "string" } } } } }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time", "example": "2022-07-07T04:24:20.444Z" }, "isDiscoverable": { "type": "boolean", "description": "Set whether the post is discoverable in search and hashtag feeds (optional, default: true).", "default": true }, "eventId": { "type": "string", "maxLength": 24, "description": "Event reference for room posts.", "example": "507f1f77bcf86cd799439011" } }, "required": [ "data" ] } } } } } }, "responses": { "201": { "description": "Scheduled post created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the scheduled post" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "tags": [ "Post" ], "summary": "Query scheduled posts", "description": "Get scheduled posts", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "notPostedOnly", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "Filter to show only posts that haven't been published yet" }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "lastCreated", "firstCreated", "lastUpdated", "firstUpdated" ], "default": "lastCreated" }, "description": "Sort order for results" }, { "name": "options", "in": "query", "schema": { "type": "object", "properties": { "after": { "type": "string", "maxLength": 24, "description": "Cursor value to get records after" }, "before": { "type": "string", "maxLength": 24, "description": "Cursor value to get records before" }, "updatedAt": { "type": "string", "maxLength": 30, "description": "use updatedAt when sorting by first or last updated" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10, "example": "options[limit]=5", "description": "Page size" }, "token": { "type": "string", "maxLength": 1000, "example": "options[token]=eyJza2lwIjoyMCwibGlABDFRffewfQ==", "description": "Pagination token" } } } } ], "responses": { "200": { "description": "Scheduled posts retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "scheduledAt": { "type": "string", "format": "date-time" }, "status": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "WAIT", "FAIL", "DONE" ] }, "description": { "type": "string" } } }, "postData": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream", "clip" ], "description": "Type of a post (ex. text, image, file, video, clip or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "description": "Body of a post. Can be different types based on content type.", "oneOf": [ { "type": "object", "title": "normal post", "description": "Standard post data (text, image, file, video)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, { "type": "object", "title": "clip post", "description": "clip post data", "properties": { "fileId": { "type": "string", "description": "file key on cloud storage." }, "thumbnailId": { "type": "string", "description": "thumbnail file id." }, "isMuted": { "type": "boolean", "description": "whether the video is muted.", "default": false }, "displayMode": { "type": "string", "description": "display mode for the video.", "enum": [ "fill", "fit" ], "default": "fill" } } } ] }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "video_content" }, "example": [ "video_content", "clips_feature", "multimedia_posts", "next_gen_social" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "files": { "type": "array", "description": "files that are related to this post", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "description": "communities that are related to this post", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } } } } }, "networkId": { "type": "string" }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "401": { "description": "Unauthorized" } } } }, "/api/v1/posts/schedule/{id}": { "put": { "tags": [ "Post" ], "summary": "Update a scheduled post", "description": "Update an existing scheduled post. Users can only update their own posts, admins can update their own posts and any brand user's posts.", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Scheduled post ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "scheduledAt": { "type": "string", "format": "date-time", "description": "Updated schedule time" }, "postData": { "type": "object", "properties": { "data": { "type": "object", "description": "Body of a post", "properties": { "title": { "type": "string", "maxLength": 150, "description": "Title of a post." }, "text": { "type": "string", "maxLength": 50000, "description": "Text content of the post.", "example": "example text" }, "fileId": { "type": "string", "maxLength": 100, "description": "File ID for image/file post.", "example": "57b916d38eaf8010caddfb7759a2d06c" }, "pollId": { "type": "string", "maxLength": 100, "description": "Poll ID for create poll post.", "example": "53a9fd8b5aaa1af6c5a1bbd245ce4a9b1627373735551" }, "streamId": { "type": "string", "maxLength": 100, "description": "Video streaming ID for create live streaming post.", "example": "81559bcc3a5bb3b6bbd69a83b89d337e" }, "roomId": { "type": "string", "maxLength": 100, "description": "Room ID for room post." } } }, "attachments": { "type": "array", "maxItems": 10, "description": "Array of attachments.", "items": { "type": "object", "description": "Attachment info", "required": [ "fileId", "type" ], "properties": { "fileId": { "type": "string", "maxLength": 100, "example": "57b916d38eaf8010caddfb7759a2d06c", "description": "File ID for attachment." }, "type": { "type": "string", "description": "Attachment type.", "enum": [ "image", "file", "video" ] }, "displayMode": { "type": "string", "enum": [ "fill", "fit" ], "default": "fit", "description": "Display mode for the clip.", "example": "fit" }, "isMuted": { "type": "boolean", "default": false, "description": "Whether the video should be muted or not.", "example": false } } } }, "dataType": { "type": "string", "example": "upstra.customtype", "description": "Accept \"liveStream\", \"poll\", \"room\" or Custom type. Custom type must be in dot separated string format or system defined format (ex. \"some.customtype\", \"com.foo.bar\")." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "default": "user", "description": "Where to create post to (default: user)." }, "targetId": { "type": "string", "maxLength": 900, "example": "public_user_id", "description": "Resource public ID depends on target type (ex. target type is community, target ID will be community public ID)." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields.", "example": { "anything": "you want" } }, "links": { "type": "array", "maxItems": 100, "description": "Array of URL links extracted from content with metadata for link preview rendering", "items": { "type": "object", "required": [ "url" ], "properties": { "index": { "type": "number", "minimum": 0, "description": "Starting position of the URL in the original text content" }, "length": { "type": "number", "minimum": 1, "description": "Length of the URL string in the original text content" }, "url": { "type": "string", "maximum": 2000, "description": "The complete URL found in the content" }, "renderPreview": { "type": "boolean", "default": false, "description": "Flag indicating whether to render a rich preview for this link" }, "domain": { "type": "string", "maximum": 2000, "description": "Domain name extracted from the URL (e.g., 'example.com')" }, "title": { "type": "string", "maximum": 2000, "description": "Title of the linked page, typically extracted from Open Graph or meta tags" }, "imageUrl": { "type": "string", "maximum": 2000, "description": "URL of the preview image for the link, typically extracted from Open Graph tags" } } } }, "postId": { "type": "string", "maxLength": 900, "example": "postidiwant", "description": "For specify public post ID on post creation." }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "description": "Tags for the post", "items": { "type": "string", "maxLength": 24, "description": "Tag string" } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "description": "Hashtags for the post", "items": { "type": "string", "maxLength": 100, "example": "tech_news" }, "example": [ "tech_news", "startup_life", "product_launch", "innovation_2025" ] }, "mentionees": { "type": "array", "maxItems": 2, "description": "The object of the mentions type and user who get a notification from the post (optional, max 2 items).", "items": { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "example": "user", "description": "Type: * `user` - need to specify userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "example": [ "userId1", "userId2" ], "description": "Array of UserId (required if type is 'user').", "items": { "type": "string" } } } } }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time", "example": "2022-07-07T04:24:20.444Z" }, "isDiscoverable": { "type": "boolean", "description": "Set whether the post is discoverable in search and hashtag feeds (optional, default: true).", "default": true }, "eventId": { "type": "string", "maxLength": 24, "description": "Event reference for room posts.", "example": "507f1f77bcf86cd799439011" } }, "required": [ "data" ] } } } } } }, "responses": { "200": { "description": "Scheduled post updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "scheduledAt": { "type": "string", "format": "date-time" }, "status": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "WAIT", "FAIL", "DONE" ] }, "description": { "type": "string" } } }, "postData": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream", "clip" ], "description": "Type of a post (ex. text, image, file, video, clip or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "description": "Body of a post. Can be different types based on content type.", "oneOf": [ { "type": "object", "title": "normal post", "description": "Standard post data (text, image, file, video)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, { "type": "object", "title": "clip post", "description": "clip post data", "properties": { "fileId": { "type": "string", "description": "file key on cloud storage." }, "thumbnailId": { "type": "string", "description": "thumbnail file id." }, "isMuted": { "type": "boolean", "description": "whether the video is muted.", "default": false }, "displayMode": { "type": "string", "description": "display mode for the video.", "enum": [ "fill", "fit" ], "default": "fill" } } } ] }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "video_content" }, "example": [ "video_content", "clips_feature", "multimedia_posts", "next_gen_social" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "files": { "type": "array", "description": "files that are related to this post", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "description": "communities that are related to this post", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } } } } }, "networkId": { "type": "string" }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "tags": [ "Post" ], "summary": "Delete a scheduled post", "description": "Delete a scheduled post. Users can only delete their own posts, admins can delete any user's posts.", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Scheduled post ID" } ], "responses": { "200": { "description": "Scheduled post deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "success" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/polls": { "post": { "summary": "create a poll", "tags": [ "Poll" ], "security": [ { "BearerAuth": [] } ], "description": "Create a poll\n", "requestBody": { "description": "Information of a poll to be created. \n### Required \n- at least 2 options \n- dataType currently supports `text` and `image`, we can also mix dataType in one poll. \n- closedIn unit must be `milliseconds` \n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "minimum": 2, "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "description": "Datatype of answer (current only string).", "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" } } } }, "answerType": { "description": "single or multiple.", "type": "string", "enum": [ "single", "multiple" ], "nullable": true, "default": null }, "closedIn": { "type": "number", "description": "Countdown time to close vote (milliseconds)" } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Poll Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/polls/{pollId}": { "put": { "summary": "update status poll", "tags": [ "Poll" ], "security": [ { "BearerAuth": [] } ], "description": "update a poll\n", "parameters": [ { "name": "pollId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Information of a poll to be updated.\n### Required\n- currently support only `closed`\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "string" }, "status": { "description": "poll status", "type": "string", "default": "closed" } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Poll Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Only creator can update poll." } } } }, "404": { "description": "Poll Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Poll not found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "get poll", "tags": [ "Poll" ], "security": [ { "BearerAuth": [] } ], "description": "List users who vote the poll with specific answer\n", "parameters": [ { "name": "pollId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Poll Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } }, "404": { "description": "Poll Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Poll not found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "delete poll", "tags": [ "Poll" ], "security": [ { "BearerAuth": [] } ], "description": "delete a poll\n", "parameters": [ { "name": "pollId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "poll deleted", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Poll Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Poll not found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/polls/{pollId}/votes": { "post": { "summary": "vote poll", "tags": [ "Poll" ], "security": [ { "BearerAuth": [] } ], "description": "Client vote poll\n", "parameters": [ { "name": "pollId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Information of a poll to be voted.\n### Required\n- answerIds for vote the poll\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "answerIds": { "description": "poll id", "type": "array", "items": { "type": "string" } } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Poll Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Poll Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Poll not found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "update poll vote", "tags": [ "Poll" ], "security": [ { "BearerAuth": [] } ], "description": "Update an existing vote on a poll\n", "parameters": [ { "name": "pollId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Information to update an existing poll vote.\n### Required\n- answerIds for updating the poll vote\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "answerIds": { "description": "Updated answer IDs for the poll vote", "type": "array", "items": { "type": "string" } } }, "required": [ "answerIds" ] } } } }, "responses": { "200": { "description": "Poll Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Poll Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Poll not found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/polls/{pollId}/answers/{answerId}": { "get": { "summary": "List users who vote the poll with specific answer", "tags": [ "Poll" ], "security": [ { "BearerAuth": [] } ], "description": "List users who vote the poll with specific answer\n", "parameters": [ { "name": "pollId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "answerId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 900 } }, { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "lastCreated", "firstCreated" ] } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 }, "token": { "type": "string", "maxLength": 1000 }, "before": { "type": "string", "maxLength": 24 }, "after": { "type": "string" } } } } ], "responses": { "200": { "description": "Poll Information and users respondent.", "content": { "application/json": { "schema": { "type": "object", "properties": { "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "UsersAnswered": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "pollId": { "type": "string" }, "answerIds": { "description": "answer id", "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "string" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "404": { "description": "Poll Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Poll not found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/posts": { "get": { "summary": "query posts", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Query posts\n", "parameters": [ { "name": "targetId", "in": "query", "schema": { "type": "string", "maxLength": 900 } }, { "name": "targetType", "required": true, "in": "query", "schema": { "type": "string", "enum": [ "community", "user", "content" ] } }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "firstCreated", "lastCreated", "lastUpdated", "firstUpdated" ], "default": "lastCreated" } }, { "name": "dataType", "in": "query", "schema": { "type": "string", "maxLength": 900 }, "example": "upstra.customtype", "description": "must be in namespace like format (ex. \"upstra.customtype\", \"com.eko.birthday\")", "deprecated": true }, { "name": "hasFlag", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "hasFlag:\n * `null(default)` - Show all posts.\n * `true` - Show only flagged post(or children) or has flagged comment.\n * `false` - Show only no flagged post(and children) and has no flagged comment. \n" }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 }, "token": { "type": "string", "maxLength": 1000 } } } }, { "name": "dataTypes", "in": "query", "description": "Child post data type to filter. Only applied if the option `matchingOnlyParentPost` is `false`. The value in array could be oneOf:\n * `video`\n * `image`\n * `file`\n * `liveStream`\n * custom post type\n * must be a string in namespace like format (ex. `upstra.customtype`, `com.eko.birthday`)\n", "schema": { "type": "array", "maxItems": 10, "items": { "oneOf": [ { "type": "string", "enum": [ "video", "image", "file", "liveStream" ], "description": "Child post data type to filter. Only applied if the option `matchingOnlyParentPost` is `false`" }, { "type": "string", "example": "upstra.customtype", "description": "custom post type - must be in namespace like format (ex. \"upstra.customtype\", \"com.eko.birthday\")" } ] } } }, { "name": "tags", "in": "query", "schema": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } } }, { "name": "matchingOnlyParentPost", "in": "query", "schema": { "type": "boolean", "default": true }, "description": "An option whether to filter only parent post or not. If `true` will return only parent posts, else will return both parent and child posts" } ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "create a post", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Create a post\n", "requestBody": { "description": "information of a post to be created.\n\nWhen `dataType` is set `data` payload can be anything but it will not support normal data capability (ex. images and files) and `data` payload size will be limit to `100kb`\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "string", "deprecated": true }, "data": { "type": "object", "description": "require text or images or files (can't add images with files)", "properties": { "title": { "type": "string", "maxLength": 150 }, "text": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "files": { "type": "array", "items": { "type": "string" } } }, "required": [ "text" ] }, "dataType": { "type": "string", "example": "upstra.customtype", "description": "must be in namespace like format (ex. \"upstra.customtype\", \"com.eko.birthday\")" }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "default": "user" }, "targetId": { "type": "string", "example": "" }, "metadata": { "type": "object" }, "postId": { "type": "string" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maximum": 24, "description": "tags" } }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time", "example": "2022-07-07T04:24:20.444Z" } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/posts/{postId}": { "get": { "summary": "get a post by ID", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Get a post by ID\n", "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "update a post", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Update a post\n", "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 900 } }, { "name": "preserve-edited-at", "in": "header", "required": false, "description": "Preserve the `editedAt` value when updating a post.\nIf the value is `true`, the `editedAt` value will not be updated.\nIf the value is `false`, the `editedAt` value will be updated.\n", "schema": { "type": "boolean", "default": false } } ], "requestBody": { "description": "information of a post to be updated.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "string", "deprecated": true }, "data": { "type": "object", "properties": { "title": { "type": "string", "maxLength": 150 }, "text": { "type": "string", "maximum": 50000, "description": "For updating text in the post" }, "fileId": { "type": "string", "maximum": 100, "description": "Put file id to update file,image inside file, image post (video is not supported yet)" }, "streamId": { "type": "string", "maximum": 100, "description": "Put stream id to update live streaming post with new streaming" }, "thumbnailFileId": { "type": "string", "maximum": 100, "description": "Put image file id to update video file thumbnail in video post" } } }, "metadata": { "type": "object" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maximum": 24, "description": "tags" } } }, "required": [ "postId" ] } } } }, "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "delete a post", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Delete a post\n", "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "post information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/posts/{postId}/approve": { "post": { "summary": "Approve reviewing post", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Get a post by ID\n", "parameters": [ { "description": "Post public id", "name": "postId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/posts/{postId}/decline": { "post": { "summary": "Decline reviewing post", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Get a post by ID\n", "parameters": [ { "description": "Post public id", "name": "postId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/posts/{postId}/flag": { "post": { "summary": "flag a post.", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 900 } } ], "requestBody": { "description": "Information required to flag a post.", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "reason": { "type": "string", "maxLength": 300, "default": "Others", "description": "The reason for flagging this post" }, "detail": { "type": "string", "maxLength": 300, "description": "Additional details about the flag" } } } } } }, "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "403": { "description": "Error when too many user is already flagged message.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Number of flag already exceed." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/posts/{postId}/isflagbyme": { "get": { "summary": "Check whether user flag a given post.", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Check whether user flag a given post.\n", "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "Is flag by me response.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "result": { "type": "boolean" } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } } } } }, "/api/v3/posts/{postId}/unflag": { "delete": { "summary": "unflag a post.", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/posts/list": { "get": { "summary": "get list of post", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Get list of post\n", "parameters": [ { "name": "postIds", "in": "query", "schema": { "type": "array", "maxItems": 100, "items": { "type": "string", "maxLength": 50 } } } ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/posts/{postId}/flags": { "delete": { "summary": "clear flags", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User is not a member of a channel" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/posts": { "get": { "summary": "query posts", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Query posts\n", "parameters": [ { "name": "targetId", "in": "query", "schema": { "type": "string", "maxLength": 900 }, "description": "ID of the target." }, { "name": "targetType", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "community", "user", "content" ] }, "description": "Type of the target.\n* `community` - Community\n* `user` - User\n* `content` - Content\n" }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "lastCreated", "firstCreated", "lastUpdated", "firstUpdated" ], "default": "lastCreated" }, "description": "Sort order for posts." }, { "name": "hasFlag", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "Filter by flag status" }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "Filter by deleted status" }, { "name": "options", "in": "query", "schema": { "type": "object", "properties": { "after": { "type": "string", "maxLength": 24, "description": "Cursor value to get records after" }, "before": { "type": "string", "maxLength": 24, "description": "Cursor value to get records before" }, "updatedAt": { "type": "string", "maxLength": 30, "description": "use updatedAt when sorting by first or last updated" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10, "example": "options[limit]=5", "description": "Page size" }, "token": { "type": "string", "maxLength": 1000, "example": "options[token]=eyJza2lwIjoyMCwibGlABDFRffewfQ==", "description": "Pagination token" } } } }, { "name": "feedType", "in": "query", "schema": { "type": "string", "enum": [ "reviewing", "published", "declined" ], "example": "published" }, "description": "Feed type to filter" }, { "name": "dataTypes", "in": "query", "schema": { "type": "array", "minItems": 1, "maxItems": 5, "items": { "type": "string", "maxLength": 100, "enum": [ "video", "image", "file", "liveStream", "poll" ] } }, "description": "Child post data type to filter. Only applied if the option `matchingOnlyParentPost` is `false`" }, { "name": "tags", "in": "query", "schema": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maximum": 24 } }, "description": "tags" }, { "name": "matchingOnlyParentPost", "in": "query", "schema": { "type": "boolean", "default": true }, "description": "An option to filter only parent post. If `true` will return only parent post, else will return both parent and child posts\n" }, { "name": "includeMixedStructure", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "An option to include mixed structure posts (posts that have different data types in parent and child posts)\n" } ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "mobile_app" }, "example": [ "mobile_app", "user_experience", "API_v4", "social_platform" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "mobile_app" }, "example": [ "mobile_app", "user_experience", "API_v4", "social_platform" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "create a post", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Create a post\n", "requestBody": { "description": "information of a post to be created.\n\nrequire text or at least 1 attachments\n\n### Custom post\n- When `dataType` is set as the custom name (dot separated string format, see the `dataType` field section), `data` payload can be anything but it will not support normal data capability (ex. `text` data will not be created)\nand `data` payload size will be limit to `100kb`\n- `attachments` will be ignored, users need to keep them in `data` field and handle the file info by themselves\n\n### Image, File, Video post\n- Put `type` with file id in `attachments`\n- Image and File data can be picked from `fileId` in `data` object in child post\n- Video fileId for each resolution will be in `videoFileId` in `data` object in child post\n\n### Live streaming post\n- When put `dataType` as `liveStream` and `streamId` in `data`, post will be created as live streaming post\n- `attachments` will be ignored\n- Video streaming info will be in `videoStreamings` object in response\n\n### Poll post\n- When put `dataType` as `poll` and `pollId` in `data`, post will be created as poll post\n- `attachments` will be ignored\n- Poll info will be in `polls` object in response\n\n### Clip post\n- Put `type = clip` with `fileId` (from POST /v4/clips) in `attachments`\n- Optionally we can add `isMuted` on the attachment to set the clip to mute for displaying on UI.\n- Optionally we can add `displayMode` on the attachment to set the clip displayMode for displaying on UI.\n- `fileId`, `isMuted`, `displayMode` will be in `data` object in child post\n\n### Room post\n- When `dataType` is `room` and `roomId` is in `data`, the post will be created as a room post\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "description": "Body of a post", "properties": { "title": { "type": "string", "maxLength": 150, "description": "Title of a post." }, "text": { "type": "string", "maxLength": 50000, "description": "Text content of the post.", "example": "example text" }, "fileId": { "type": "string", "maxLength": 100, "description": "File ID for image/file post.", "example": "57b916d38eaf8010caddfb7759a2d06c" }, "pollId": { "type": "string", "maxLength": 100, "description": "Poll ID for create poll post.", "example": "53a9fd8b5aaa1af6c5a1bbd245ce4a9b1627373735551" }, "streamId": { "type": "string", "maxLength": 100, "description": "Video streaming ID for create live streaming post.", "example": "81559bcc3a5bb3b6bbd69a83b89d337e" }, "roomId": { "type": "string", "maxLength": 100, "description": "Room ID for room post." } } }, "attachments": { "type": "array", "maxItems": 10, "description": "Array of attachments.", "items": { "type": "object", "description": "Attachment info", "required": [ "fileId", "type" ], "properties": { "fileId": { "type": "string", "maxLength": 100, "example": "57b916d38eaf8010caddfb7759a2d06c", "description": "File ID for attachment." }, "type": { "type": "string", "description": "Attachment type.", "enum": [ "image", "file", "video" ] }, "displayMode": { "type": "string", "enum": [ "fill", "fit" ], "default": "fit", "description": "Display mode for the clip.", "example": "fit" }, "isMuted": { "type": "boolean", "default": false, "description": "Whether the video should be muted or not.", "example": false } } } }, "dataType": { "type": "string", "example": "upstra.customtype", "description": "Accept \"liveStream\", \"poll\", \"room\" or Custom type. Custom type must be in dot separated string format or system defined format (ex. \"some.customtype\", \"com.foo.bar\")." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "default": "user", "description": "Where to create post to (default: user)." }, "targetId": { "type": "string", "maxLength": 900, "example": "public_user_id", "description": "Resource public ID depends on target type (ex. target type is community, target ID will be community public ID)." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields.", "example": { "anything": "you want" } }, "links": { "type": "array", "maxItems": 100, "description": "Array of URL links extracted from content with metadata for link preview rendering", "items": { "type": "object", "required": [ "url" ], "properties": { "index": { "type": "number", "minimum": 0, "description": "Starting position of the URL in the original text content" }, "length": { "type": "number", "minimum": 1, "description": "Length of the URL string in the original text content" }, "url": { "type": "string", "maximum": 2000, "description": "The complete URL found in the content" }, "renderPreview": { "type": "boolean", "default": false, "description": "Flag indicating whether to render a rich preview for this link" }, "domain": { "type": "string", "maximum": 2000, "description": "Domain name extracted from the URL (e.g., 'example.com')" }, "title": { "type": "string", "maximum": 2000, "description": "Title of the linked page, typically extracted from Open Graph or meta tags" }, "imageUrl": { "type": "string", "maximum": 2000, "description": "URL of the preview image for the link, typically extracted from Open Graph tags" } } } }, "postId": { "type": "string", "maxLength": 900, "example": "postidiwant", "description": "For specify public post ID on post creation." }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "description": "Tags for the post", "items": { "type": "string", "maxLength": 24, "description": "Tag string" } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "description": "Hashtags for the post", "items": { "type": "string", "maxLength": 100, "example": "tech_news" }, "example": [ "tech_news", "startup_life", "product_launch", "innovation_2025" ] }, "mentionees": { "type": "array", "maxItems": 2, "description": "The object of the mentions type and user who get a notification from the post (optional, max 2 items).", "items": { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "example": "user", "description": "Type: * `user` - need to specify userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "example": [ "userId1", "userId2" ], "description": "Array of UserId (required if type is 'user').", "items": { "type": "string" } } } } }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time", "example": "2022-07-07T04:24:20.444Z" }, "isDiscoverable": { "type": "boolean", "description": "Set whether the post is discoverable in search and hashtag feeds (optional, default: true).", "default": true }, "eventId": { "type": "string", "maxLength": 24, "description": "Event reference for room posts.", "example": "507f1f77bcf86cd799439011" } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream", "clip" ], "description": "Type of a post (ex. text, image, file, video, clip or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "description": "Body of a post. Can be different types based on content type.", "oneOf": [ { "type": "object", "title": "normal post", "description": "Standard post data (text, image, file, video)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, { "type": "object", "title": "clip post", "description": "clip post data", "properties": { "fileId": { "type": "string", "description": "file key on cloud storage." }, "thumbnailId": { "type": "string", "description": "thumbnail file id." }, "isMuted": { "type": "boolean", "description": "whether the video is muted.", "default": false }, "displayMode": { "type": "string", "description": "display mode for the video.", "enum": [ "fill", "fit" ], "default": "fill" } } } ] }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "video_content" }, "example": [ "video_content", "clips_feature", "multimedia_posts", "next_gen_social" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "mobile_app" }, "example": [ "mobile_app", "user_experience", "API_v4", "social_platform" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/posts/{postId}": { "put": { "summary": "update a post", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Update a post\n", "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "preserve-edited-at", "in": "header", "required": false, "description": "Preserve the `editedAt` value when updating a post.\nIf the value is `true`, the `editedAt` value will not be updated.\nIf the value is `false`, the `editedAt` value will be updated.\n", "schema": { "type": "boolean", "default": false } } ], "requestBody": { "description": "information of a post to be updated.\n### Image, File, Video post update - Put `type` with file id in `attachments` - Image and File data can be picked from `fileId` in `data` object in child post - Video fileId for each resolution will be in `videoFileId` in `data` object in child post\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "string", "deprecated": true }, "data": { "type": "object", "properties": { "title": { "type": "string", "maxLength": 150, "description": "Title of a post." }, "text": { "type": "string", "maximum": 50000, "description": "For updating text in the post" }, "fileId": { "type": "string", "maximum": 100, "description": "Put file id to update file,image inside file, image post (video is not supported yet)" }, "streamId": { "type": "string", "maximum": 100, "description": "Put stream id to update live streaming post with new streaming" }, "thumbnailFileId": { "type": "string", "maximum": 100, "description": "Put image file id to update video file thumbnail in video post" } } }, "metadata": { "type": "object" }, "links": { "type": "array", "maxItems": 100, "description": "Array of URL links extracted from content with metadata for link preview rendering", "items": { "type": "object", "required": [ "url" ], "properties": { "index": { "type": "number", "minimum": 0, "description": "Starting position of the URL in the original text content" }, "length": { "type": "number", "minimum": 1, "description": "Length of the URL string in the original text content" }, "url": { "type": "string", "maximum": 2000, "description": "The complete URL found in the content" }, "renderPreview": { "type": "boolean", "default": false, "description": "Flag indicating whether to render a rich preview for this link" }, "domain": { "type": "string", "maximum": 2000, "description": "Domain name extracted from the URL (e.g., 'example.com')" }, "title": { "type": "string", "maximum": 2000, "description": "Title of the linked page, typically extracted from Open Graph or meta tags" }, "imageUrl": { "type": "string", "maximum": 2000, "description": "URL of the preview image for the link, typically extracted from Open Graph tags" } } } }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maximum": 24, "description": "tags" } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "content_update" }, "example": [ "content_update", "revised_post", "community_feedback", "enhanced_version" ], "description": "Hashtags for the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "example": "user", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "example": [ "userId1", "userId2" ], "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "items": { "type": "object", "description": "attachment info", "properties": { "fileId": { "type": "string", "example": "57b916d38eaf8010caddfb7759a2d06c", "description": "file id for attachment" }, "type": { "type": "string", "description": "attachment type", "enum": [ "image", "file", "video" ] } } } }, "reason": { "type": "string", "maxLength": 300, "description": "Optional reason for the edit (admin only, ignored for regular users)" } } } } } }, "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream", "clip" ], "description": "Type of a post (ex. text, image, file, video, clip or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "description": "Body of a post. Can be different types based on content type.", "oneOf": [ { "type": "object", "title": "normal post", "description": "Standard post data (text, image, file, video)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, { "type": "object", "title": "clip post", "description": "clip post data", "properties": { "fileId": { "type": "string", "description": "file key on cloud storage." }, "thumbnailId": { "type": "string", "description": "thumbnail file id." }, "isMuted": { "type": "boolean", "description": "whether the video is muted.", "default": false }, "displayMode": { "type": "string", "description": "display mode for the video.", "enum": [ "fill", "fit" ], "default": "fill" } } } ] }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "video_content" }, "example": [ "video_content", "clips_feature", "multimedia_posts", "next_gen_social" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "mobile_app" }, "example": [ "mobile_app", "user_experience", "API_v4", "social_platform" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "delete a post", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Delete a post\n", "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "permanent", "in": "query", "schema": { "type": "boolean", "default": false, "description": "If permanent data will be hard deleted" } } ], "responses": { "200": { "description": "post information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/posts/{postId}/kv": { "patch": { "summary": "patch post data and metadata", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Partially update post data and/or metadata fields using set/delete operations.\n\n### Rules:\n- **Data patching**: Only allowed for custom posts (posts with custom dataType, not standard post types like `text`, `image`, `video`, etc.)\n- **Metadata patching**: Allowed for all post types\n", "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Patch operations for post data and metadata fields.\n\nUse set/delete operations to partially update fields:\n- `set`: Add or update key-value pairs\n- `delete`: Remove keys\n\nAt least one of `data` or `metadata` must be provided.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "description": "Patch operations for post data (custom posts only)", "properties": { "set": { "type": "object", "description": "Key-value pairs to set or update. Maximum 100 operations.", "additionalProperties": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "example": { "customField1": "value", "customField2": 123, "customField3": true, "nullableField": null, "config.api.endpoint": "https://api.example.com", "key with spaces": "allowed" } }, "delete": { "type": "array", "description": "Array of keys to delete. Maximum 100 operations.", "items": { "type": "string" }, "maxItems": 100, "example": [ "oldField1", "oldField2" ] } } }, "metadata": { "type": "object", "description": "Patch operations for post metadata (all post types)", "properties": { "set": { "type": "object", "description": "Key-value pairs to set or update. Maximum 100 operations.", "additionalProperties": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "example": { "category": "updated", "priority": 5, "featured": true } }, "delete": { "type": "array", "description": "Array of keys to delete. Maximum 100 operations.", "items": { "type": "string" }, "maxItems": 100, "example": [ "oldMeta1", "oldMeta2" ] } } } } }, "examples": { "setDataFields": { "summary": "Set data fields (custom posts only)", "value": { "data": { "set": { "customField1": "new value", "customField2": 42, "customField3": true } } } }, "deleteDataFields": { "summary": "Delete data fields", "value": { "data": { "delete": [ "oldField1", "oldField2" ] } } }, "setAndDeleteData": { "summary": "Combine set and delete operations", "value": { "data": { "set": { "newField": "value" }, "delete": [ "oldField" ] } } }, "patchMetadata": { "summary": "Patch metadata (works for all post types)", "value": { "metadata": { "set": { "category": "updated", "version": 2 }, "delete": [ "deprecatedField" ] } } }, "patchBothDataAndMetadata": { "summary": "Patch both data and metadata", "value": { "data": { "set": { "customData": "value" } }, "metadata": { "set": { "status": "active" }, "delete": [ "tempField" ] } } } } } } }, "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream", "clip" ], "description": "Type of a post (ex. text, image, file, video, clip or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "description": "Body of a post. Can be different types based on content type.", "oneOf": [ { "type": "object", "title": "normal post", "description": "Standard post data (text, image, file, video)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, { "type": "object", "title": "clip post", "description": "clip post data", "properties": { "fileId": { "type": "string", "description": "file key on cloud storage." }, "thumbnailId": { "type": "string", "description": "thumbnail file id." }, "isMuted": { "type": "boolean", "description": "whether the video is muted.", "default": false }, "displayMode": { "type": "string", "description": "display mode for the video.", "enum": [ "fill", "fit" ], "default": "fill" } } } ] }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "video_content" }, "example": [ "video_content", "clips_feature", "multimedia_posts", "next_gen_social" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "mobile_app" }, "example": [ "mobile_app", "user_experience", "API_v4", "social_platform" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Parameters validation error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v5/posts": { "get": { "summary": "query posts", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Query posts, (this will include new post dataType `clip` in the response).\n", "parameters": [ { "name": "targetId", "in": "query", "schema": { "type": "string", "maxLength": 900 }, "description": "ID of the target." }, { "name": "targetType", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "community", "user", "content", "all" ] }, "description": "Type of the target.\n* `community` - Community\n* `user` - User\n* `content` - Content\n* `all` - All\n" }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "lastCreated", "firstCreated", "lastUpdated", "firstUpdated" ], "default": "lastCreated" }, "description": "Sort order for posts." }, { "name": "hasFlag", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "Filter by flag status" }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "Filter by deleted status" }, { "name": "feedType", "in": "query", "schema": { "type": "string", "enum": [ "reviewing", "published", "declined" ], "example": "published" }, "description": "Feed type to filter" }, { "name": "dataTypes", "in": "query", "schema": { "type": "array", "minItems": 1, "maxItems": 6, "items": { "type": "string", "maxLength": 100, "enum": [ "video", "image", "file", "liveStream", "poll", "clip" ] } }, "description": "Post data type to filter (include child posts too)." }, { "name": "tags", "in": "query", "schema": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maximum": 24 } }, "description": "tags" }, { "name": "matchingOnlyParentPost", "in": "query", "schema": { "type": "boolean", "default": true }, "description": "An option to filter only parent post. If `true` will return only parent post, else will return both parent and child posts\n" }, { "name": "options[limit]", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10, "example": "options[limit]=5", "description": "Page size" } }, { "name": "options[after]", "in": "query", "schema": { "type": "string", "maxLength": 24, "description": "Cursor value to get records after" } }, { "name": "options[before]", "in": "query", "schema": { "type": "string", "maxLength": 24, "description": "Cursor value to get records before" } }, { "name": "options[updatedAt]", "in": "query", "schema": { "type": "string", "maxLength": 30, "description": "Use updatedAt when sorting by first or last updated" } }, { "name": "options[token]", "in": "query", "schema": { "type": "string", "maxLength": 1000, "example": "options[token]=eyJza2lwIjoyMCwibGlABDFRffewfQ==", "description": "Pagination token" } }, { "name": "includeMixedStructure", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "An option to include mixed structure posts (posts that have different data types in parent and child posts)\n" } ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream", "clip" ], "description": "Type of a post (ex. text, image, file, video, clip or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "description": "Body of a post. Can be different types based on content type.", "oneOf": [ { "type": "object", "title": "normal post", "description": "Standard post data (text, image, file, video)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, { "type": "object", "title": "clip post", "description": "clip post data", "properties": { "fileId": { "type": "string", "description": "file key on cloud storage." }, "thumbnailId": { "type": "string", "description": "thumbnail file id." }, "isMuted": { "type": "boolean", "description": "whether the video is muted.", "default": false }, "displayMode": { "type": "string", "description": "display mode for the video.", "enum": [ "fill", "fit" ], "default": "fill" } } } ] }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "video_content" }, "example": [ "video_content", "clips_feature", "multimedia_posts", "next_gen_social" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "mobile_app" }, "example": [ "mobile_app", "user_experience", "API_v4", "social_platform" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/presence/settings": { "get": { "summary": "Get presence feature setting on both network and user level", "description": "Get presence feature setting on both network and user level", "tags": [ "Presence" ], "responses": { "200": { "description": "Get presence feature setting response", "content": { "application/json": { "schema": { "description": "Presence feature setting", "type": "object", "properties": { "user": { "description": "Presence user setting", "type": "object", "properties": { "enabled": { "type": "boolean" }, "enabledAt": { "type": "string", "format": "date-time" } }, "required": [ "enabled" ] }, "network": { "description": "Presence network setting without enabled", "type": "object", "properties": { "heartbeatInterval": { "description": "the time interval for sending heartbeat for client", "type": "integer", "minimum": 20, "maximum": 50 }, "presenceSyncInterval": { "description": "the time interval for syncing the user list presence for client", "type": "integer", "minimum": 20, "maximum": 50 }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "heartbeatInterval", "presenceSyncInterval" ] } } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/api/v1/presence/settings/user": { "put": { "summary": "Update presence feature setting on user level", "description": "Update presence feature setting on user level.", "tags": [ "Presence" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": [ "enabled" ] } } } }, "responses": { "200": { "description": "Update presence user setting response", "content": { "application/json": { "schema": { "description": "Presence user setting", "type": "object", "properties": { "enabled": { "type": "boolean" }, "enabledAt": { "type": "string", "format": "date-time" } }, "required": [ "enabled" ] } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/api/v1/presence/users/list": { "get": { "summary": "Get presence state of provided user list", "description": "Get presence state of provided user list\n - Max userIds list of 220 items\n - Each id max length up to 300\n", "tags": [ "Presence" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "userIds", "in": "query", "required": true, "schema": { "type": "array", "description": "A list of user ID", "maxItems": 220, "items": { "type": "string", "maxLength": 300 }, "example": [ "yama69", "yama420" ] } } ], "responses": { "200": { "description": "Get user presence list response", "content": { "application/json": { "schema": { "description": "List of user presence", "type": "object", "properties": { "presences": { "type": "array", "items": { "description": "Presence Object", "type": "object", "properties": { "userId": { "type": "string" }, "lastHeartbeat": { "type": "string", "format": "date-time" } }, "required": [ "userId" ] } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/presence/network/users": { "get": { "summary": "Get online users in a network", "description": "Get online users in a network\n - Automatically sortedBy heartbeat time)\n - Return max 1000 users\n", "tags": [ "Presence" ], "parameters": [ { "name": "orderBy", "in": "query", "schema": { "type": "string", "enum": [ "asc", "desc" ] } } ], "responses": { "200": { "description": "Get online users presence response", "content": { "application/json": { "schema": { "description": "List of user presence", "type": "object", "properties": { "presences": { "type": "array", "items": { "description": "Presence Object", "type": "object", "properties": { "userId": { "type": "string" }, "lastHeartbeat": { "type": "string", "format": "date-time" } }, "required": [ "userId" ] } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/api/v1/presence/network/users/count": { "get": { "summary": "Get number of online users in a network", "description": "Get number of online users in a network", "tags": [ "Presence" ], "responses": { "200": { "description": "Get online users count response", "content": { "application/json": { "schema": { "description": "Online users count", "type": "object", "properties": { "count": { "type": "integer" }, "referenceTimeStamp": { "type": "string" } }, "required": [ "count", "referenceTimeStamp" ] } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/api/v1/presence/heartbeat": { "post": { "summary": "Send a presence heartbeat", "description": "Send a presence heartbeat", "tags": [ "Presence" ], "responses": { "202": { "description": "Send heartbeat response", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } }, "required": [ "success" ] } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/api/v1/reactions/live": { "post": { "summary": "Send live reactions", "description": "Send reactions to a live streaming.", "tags": [ "Reaction" ], "requestBody": { "description": "List of live reactions to submit.", "content": { "application/json": { "schema": { "type": "object", "properties": { "liveStreamId": { "type": "string", "description": "Live stream ID." }, "reactions": { "type": "array", "description": "List of live reactions to submit.", "items": { "type": "object", "properties": { "referencePublicId": { "type": "string", "description": "Post's public ID." }, "referenceType": { "type": "string", "description": "Type of reference (must be 'post')." }, "reactionName": { "type": "string", "description": "Name of the reaction." }, "occurredAt": { "type": "string", "description": "The date/time when the reaction occurred.", "format": "date-time" } } } } } } } } }, "responses": { "202": { "description": "Live reaction submission response.", "content": { "application/json": { "schema": { "type": "object", "properties": { "reactions": { "type": "array", "description": "List of processed live reactions.", "items": { "type": "object", "description": "Live reaction submission response.", "properties": { "userId": { "type": "string", "description": "The public ID of user who reacted." }, "liveStreamId": { "type": "string", "description": "Live stream ID." }, "targetId": { "type": "string", "description": "The public ID of user or community." }, "targetType": { "type": "string", "enum": [ "user", "community" ] }, "referencePublicId": { "type": "string", "description": "The public ID of the post." }, "referenceId": { "type": "string", "description": "The internal ID of the post." }, "referenceType": { "type": "string", "enum": [ "post" ], "description": "Type of reference (must be 'post')." }, "reactionName": { "type": "string", "description": "Name of the reaction." }, "occurredAt": { "type": "string", "format": "date-time", "description": "The date/time when the reaction occurred." } } } } } } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "422": { "description": "Parameters validation error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters validation error" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/api/v2/reactions/messages/most": { "get": { "summary": "Get message ids by the most of reactions.", "tags": [ "Reaction" ], "security": [ { "BearerAuth": [] } ], "description": "Get message ids by the most of reactions.\n", "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1 } }, { "name": "reactionName", "description": "Reaction name", "in": "query", "schema": { "type": "string", "maxLength": 100 } } ], "responses": { "200": { "description": "Message information.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "messageId": { "type": "string" }, "reactionsCount": { "type": "integer" } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v2/reactions": { "get": { "summary": "get list of reactions.", "tags": [ "Reaction" ], "security": [ { "BearerAuth": [] } ], "description": "Get paginable list of reactions.\n", "parameters": [ { "name": "referenceId", "description": "Reference id", "in": "query", "required": true, "schema": { "type": "string", "maxLength": 900 } }, { "name": "referenceType", "description": "Reference type", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "message", "post", "comment", "story" ] } }, { "name": "reactionName", "description": "Reaction name", "in": "query", "schema": { "type": "string", "maxLength": 100 } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 0 }, "token": { "type": "string", "maxLength": 1000 }, "skip": { "type": "integer", "minimum": 0 } } } } ], "responses": { "200": { "description": "Reaction information.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "reactions": { "type": "array", "items": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactors": { "type": "array", "description": "List of mapping between reaction and reactor ID.", "items": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } }, "required": [ "referenceId", "referenceType" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "add reaction to any document.", "tags": [ "Reaction" ], "security": [ { "BearerAuth": [] } ], "description": "Add reaction to a document referenced by ID and type.\n", "requestBody": { "description": "reference ID and type with reaction name\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "referenceId": { "type": "string", "maxLength": 900 }, "referenceType": { "type": "string", "enum": [ "message", "post", "comment", "story" ] }, "reactionName": { "type": "string", "maxLength": 100 }, "referenceVersion": { "description": "The API version of the document (Ex. If using with message v5, the referenceVersion will be 5)", "type": "integer" } }, "required": [ "referenceId", "referenceType", "reactionName" ] } } } }, "responses": { "200": { "description": "Returns a reaction id is added", "content": { "application/json": { "schema": { "type": "object", "properties": { "addedId": { "type": "string" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "remove reaction from any document.", "tags": [ "Reaction" ], "security": [ { "BearerAuth": [] } ], "description": "Remove reaction from a document referenced by ID and type.\n", "parameters": [ { "name": "referenceId", "description": "Reference id", "in": "query", "required": true, "schema": { "type": "string", "maxLength": 900 } }, { "name": "referenceType", "description": "Reference type", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "message", "post", "comment", "story" ] } }, { "name": "reactionName", "description": "Reaction name", "in": "query", "schema": { "type": "string", "maxLength": 100 } }, { "in": "query", "name": "referenceVersion", "schema": { "type": "integer" }, "description": "The API version of the document (Ex. If using with message v5, the referenceVersion will be 5)" } ], "responses": { "200": { "description": "Returns a reaction id is removed", "content": { "application/json": { "schema": { "type": "object", "properties": { "removedId": { "type": "string" } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/reactions": { "get": { "summary": "get list of reactions.", "tags": [ "Reaction" ], "security": [ { "BearerAuth": [] } ], "description": "Get paginable list of reactions.\n", "parameters": [ { "name": "referenceId", "in": "query", "required": true, "schema": { "type": "string", "maxLength": 900 } }, { "name": "referenceType", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "message", "post", "comment", "story" ] } }, { "name": "referenceVersion", "in": "query", "schema": { "type": "integer" } }, { "name": "reactionName", "in": "query", "schema": { "type": "string", "maxLength": 100 } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 0 }, "token": { "type": "string", "maxLength": 200 } } } } ], "responses": { "200": { "description": "Reaction information.", "content": { "application/json": { "schema": { "type": "object", "properties": { "reactions": { "type": "array", "items": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactors": { "type": "array", "description": "List of mapping between reaction and reactor ID.", "items": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } }, "required": [ "referenceId", "referenceType" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/rooms": { "post": { "summary": "create room", "tags": [ "Room" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "Information of room to be created\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "maxLength": 1000, "description": "Room title" }, "description": { "type": "string", "maxLength": 5000, "description": "Room description" }, "thumbnailFileId": { "type": "string", "maxLength": 50, "description": "Thumbnail file ID" }, "metadata": { "type": "object", "description": "Custom metadata" }, "liveChatEnabled": { "type": "boolean", "description": "Indicates whether the live channel (chat) is enabled for the room", "default": true }, "parentRoomId": { "type": "string", "description": "Optional parent room ID for creating child streams", "maxLength": 50 }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room: directStreaming for single participant streaming, coHosts for multiple participants", "default": "directStreaming" } }, "required": [ "title" ] } } } }, "responses": { "200": { "description": "list of rooms", "content": { "application/json": { "schema": { "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "get list of rooms", "tags": [ "Room" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "statuses", "in": "query", "schema": { "type": "array", "maxItems": 10, "items": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ] } }, "description": "Status of room \n * idle - room is just created \n * live - broadcasting is active \n * waitingReconnect - broadcaster disconnected, waiting for reconnection \n * ended - broadcasting stopped \n * recorded - room recordings available \n" }, { "name": "type", "in": "query", "schema": { "type": "string", "enum": [ "directStreaming", "coHosts" ] }, "description": "Type of room \n * directStreaming - single participant streaming \n * coHosts - multiple participant streaming \n" }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "firstCreated", "lastCreated" ] } }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "isDeleted:\n * `null(default)` - Show both active and inactive rooms.\n * `true` - Show inactive rooms only.\n * `false` - Show active rooms only.\n" }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer" }, "token": { "type": "string", "maxLength": 1000 } } } } ], "responses": { "200": { "description": "room information", "content": { "application/json": { "schema": { "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/rooms/{roomId}": { "get": { "summary": "get single room", "tags": [ "Room" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "in": "path", "name": "roomId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Room ID" } ], "responses": { "200": { "description": "list of rooms", "content": { "application/json": { "schema": { "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "update room", "tags": [ "Room" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "in": "path", "name": "roomId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Room ID" } ], "requestBody": { "description": "Information of room to be updated\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "maxLength": 1000, "description": "Room title" }, "description": { "type": "string", "maxLength": 5000, "description": "Room description" }, "thumbnailFileId": { "type": "string", "maxLength": 50, "description": "Thumbnail file ID" }, "metadata": { "type": "object", "description": "Custom metadata" }, "channelEnabled": { "type": "boolean", "description": "Enable or disable live channel" } } } } } }, "responses": { "200": { "description": "list of rooms", "content": { "application/json": { "schema": { "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "delete room", "tags": [ "Room" ], "security": [ { "BearerAuth": [] } ], "description": "Delete a room\n", "parameters": [ { "in": "path", "name": "roomId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Room ID" } ], "responses": { "200": { "description": "room information", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/rooms/{roomId}/stop": { "post": { "summary": "stop room", "tags": [ "Room" ], "security": [ { "BearerAuth": [] } ], "description": "Stop a room and end the broadcasting\n", "parameters": [ { "in": "path", "name": "roomId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Room ID" } ], "responses": { "200": { "description": "list of rooms", "content": { "application/json": { "schema": { "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/rooms/{roomId}/token": { "get": { "summary": "get ingest data (stream key or livekit token)", "tags": [ "Room" ], "security": [ { "BearerAuth": [] } ], "description": "Get ingest data for broadcasting. Returns stream key for direct streaming or LiveKit token for co-hosts.\n", "parameters": [ { "in": "path", "name": "roomId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Room ID" } ], "responses": { "200": { "description": "ingest data for broadcasting", "content": { "application/json": { "schema": { "properties": { "directStreamUrl": { "type": "string", "description": "URL for direct streaming" }, "coHostToken": { "type": "string", "description": "Access token for co-hosts" }, "coHostUrl": { "type": "string", "description": "URL for co-hosts" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/rooms/{roomId}/participants": { "delete": { "summary": "remove participant from room", "tags": [ "Room" ], "security": [ { "BearerAuth": [] } ], "description": "Remove a participant from the room\n", "parameters": [ { "in": "path", "name": "roomId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Room ID" } ], "requestBody": { "description": "Information of participants to be removed from the room\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "participantUserId": { "type": "string", "description": "User ID of the participant to be removed from the room", "maxLength": 50 } }, "required": [ "participantUserId" ] } } } }, "responses": { "200": { "description": "list of rooms", "content": { "application/json": { "schema": { "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/rooms/{roomId}/recorded/{playbackId}/watch": { "get": { "summary": "Watch recorded playback", "tags": [ "Room" ], "security": [], "description": "Get signed URL to watch recorded playback\n", "parameters": [ { "name": "Authorization", "in": "header", "schema": { "type": "string" } }, { "name": "_ascSession", "in": "cookie", "schema": { "type": "string" }, "description": "Access token" }, { "in": "path", "name": "roomId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Room ID" }, { "in": "path", "name": "playbackId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Playback ID" } ], "responses": { "302": { "description": "Redirect to watch recorded playback", "headers": { "Location": { "description": "Signed URL to redirect to", "schema": { "type": "string" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } } } } }, "/api/v1/rooms/{roomId}/recorded/{playbackId}/thumbnail": { "get": { "summary": "Download recorded thumbnail", "tags": [ "Room" ], "security": [], "description": "Get signed URL to download recorded thumbnail image\n", "parameters": [ { "name": "Authorization", "in": "header", "schema": { "type": "string" } }, { "name": "_ascSession", "in": "cookie", "schema": { "type": "string" }, "description": "Access token" }, { "in": "path", "name": "roomId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Room ID" }, { "in": "path", "name": "playbackId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Playback ID" } ], "responses": { "302": { "description": "Redirect to download recorded thumbnail", "headers": { "Location": { "description": "Signed URL to redirect to", "schema": { "type": "string" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } } } } }, "/api/v1/rooms/{roomId}/viewer-bans": { "post": { "summary": "ban viewers from a room", "tags": [ "Room" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "in": "path", "name": "roomId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Room ID" } ], "requestBody": { "description": "Information of viewers to be banned from the room\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userIds": { "type": "array", "items": { "type": "string", "maxLength": 50 }, "minItems": 1, "maxItems": 100, "description": "List of user IDs to ban from the room" } }, "required": [ "userIds" ] } } } }, "responses": { "200": { "description": "Successfully banned users", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "get list of banned viewers", "tags": [ "Room" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "in": "path", "name": "roomId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Room ID" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1 }, "description": "Maximum number of results to return" }, { "name": "token", "in": "query", "schema": { "type": "string", "maxLength": 1000 }, "description": "Pagination token for fetching next set of results" } ], "responses": { "200": { "description": "List of banned users from room", "content": { "application/json": { "schema": { "type": "object", "properties": { "roomBannedUsers": { "type": "array", "items": { "type": "object", "required": [ "userId", "banBy", "userPublicId", "banByPublicId", "createdAt" ], "properties": { "userId": { "type": "string" }, "banBy": { "type": "string" }, "userPublicId": { "type": "string" }, "banByPublicId": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "unban viewers from a room", "tags": [ "Room" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "in": "path", "name": "roomId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Room ID" } ], "requestBody": { "description": "Information of viewers to be unbanned from the room\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userIds": { "type": "array", "items": { "type": "string", "maxLength": 50 }, "minItems": 1, "maxItems": 100, "description": "List of user IDs to unban from the room" } }, "required": [ "userIds" ] } } } }, "responses": { "200": { "description": "Successfully unbanned users", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v2/roles": { "get": { "summary": "get all roles", "tags": [ "Role" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Get all roles\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Roles information.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "moderatonSettings": { "type": "array", "items": { "type": "object", "properties": { "maxRepetition": { "type": "integer" }, "maxRepetitionTimeout": { "type": "integer" }, "blacklistMuteTimeout": { "type": "integer" }, "whitelistMuteTimeout": { "type": "integer" }, "maxRepetitionMuteTimeout": { "type": "integer" }, "enableImageModeration": { "type": "boolean" }, "imageModeration": { "type": "object", "properties": { "nudity": { "type": "number" }, "suggestive": { "type": "number" }, "violence": { "type": "number" }, "disturbing": { "type": "number" } } }, "createdAt": { "type": "string", "description": "The date/time when a rule is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a rule is updated or deleted.", "format": "date-time" } } } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "permissions": { "type": "array", "items": { "type": "string" } }, "publicId": { "type": "string" } }, "required": [ "publicId" ] } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } }, "put": { "summary": "add permissions.", "tags": [ "Role" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Add permissions\n", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Permission information to be added\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "publicIds": { "type": "array", "description": "The list of role public ids", "items": { "type": "string" } }, "permissions": { "type": "array", "description": "The list of permission to be added. You can see all permissions at https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions", "items": { "type": "string" } } }, "required": [ "publicIds", "permissions" ] } } } }, "responses": { "200": { "description": "OK" }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 404, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 429, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500, "message": "Unexpected error" } } } } } } }, "/api/v3/roles": { "get": { "summary": "Get roles (pagination support)", "tags": [ "Role" ], "security": [ { "BearerAuth": [] } ], "description": "Get roles (pagination support)\n", "parameters": [ { "name": "keyword", "in": "query", "required": true, "schema": { "type": "string", "minLength": 0, "maxLength": 100 }, "description": "search keyword" }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "lastCreated", "firstCreated", "displayName" ], "default": "lastCreated" } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 }, "token": { "type": "string", "maxLength": 1000 } } } } ], "responses": { "200": { "description": "Role Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "post": { "summary": "Create role", "tags": [ "Role" ], "security": [ { "BearerAuth": [] } ], "description": "Create a role\n", "requestBody": { "description": "information of a role to be created.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "roleId": { "type": "string", "description": "role id", "minLength": 1, "maxLength": 100 }, "displayName": { "type": "string", "description": "display name of role", "minLength": 0, "maxLength": 100 }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" } }, "required": [ "roleId", "permissions" ] } } } }, "responses": { "200": { "description": "Role Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "Permission denied" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/roles/{roleId}": { "get": { "summary": "Get role", "tags": [ "Role" ], "security": [ { "BearerAuth": [] } ], "description": "Get a role\n", "parameters": [ { "name": "roleId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Role Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "Update role", "tags": [ "Role" ], "security": [ { "BearerAuth": [] } ], "description": "Update a role\n", "parameters": [ { "name": "roleId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "information of a role to be created.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "roleId": { "type": "string", "description": "role id", "minLength": 1, "maxLength": 100 }, "displayName": { "type": "string", "description": "display name of role", "minLength": 0, "maxLength": 100 }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" } }, "required": [ "roleId", "permissions" ] } } } }, "responses": { "200": { "description": "Role Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "Permission denied" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Delete role", "tags": [ "Role" ], "security": [ { "BearerAuth": [] } ], "description": "Delete a role\n", "parameters": [ { "name": "roleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "roleId", "schema": { "type": "string", "minLength": 1, "maxLength": 100 }, "description": "role id to delete" } ], "responses": { "200": { "description": "Role Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "Permission denied.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "Permission denied" } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/search/posts": { "get": { "summary": "Search posts", "tags": [ "Post" ], "security": [ { "BearerAuth": [] } ], "description": "Search posts.\n", "parameters": [ { "name": "targetId", "in": "query", "schema": { "type": "string", "maxLength": 900 }, "description": "ID of the target." }, { "name": "targetType", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "community", "user", "content" ] }, "description": "Type of the target.\n* `community` - Community\n* `user` - User\n* `content` - Content\n" }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "lastCreated", "firstCreated", "lastUpdated", "firstUpdated" ], "default": "lastCreated" }, "description": "Sort order for posts." }, { "name": "hasFlag", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "Filter by flag status" }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "Filter by deleted status" }, { "name": "feedType", "in": "query", "schema": { "type": "string", "enum": [ "reviewing", "published", "declined" ], "example": "published" }, "description": "Feed type to filter" }, { "name": "dataTypes", "in": "query", "schema": { "type": "array", "minItems": 1, "maxItems": 6, "items": { "type": "string", "maxLength": 100, "enum": [ "video", "image", "file", "liveStream", "poll", "clip" ] } }, "description": "Post data type to filter (include child posts too)." }, { "name": "tags", "in": "query", "schema": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maximum": 24 } }, "description": "tags" }, { "name": "hashtags", "in": "query", "schema": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "pattern": "^[\\p{L}\\p{N}_]+$", "example": "search_query" }, "example": [ "technology", "AI_trends", "programming", "web_development" ] }, "description": "Filter posts by hashtags. Only letter characters, numbers and underscores are allowed. Case-insensitive matching. Also, tags and hashtags is a different thing. Tags are used to categorize posts, while hashtags are used to tag content with relevant keywords or phrases." }, { "name": "matchingOnlyParentPost", "in": "query", "schema": { "type": "boolean", "default": true }, "description": "An option to filter only parent post. If `true` will return only parent post, else will return both parent and child posts\n" }, { "name": "options[limit]", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10, "example": "options[limit]=5", "description": "Page size" } }, { "name": "options[after]", "in": "query", "schema": { "type": "string", "maxLength": 24, "description": "Cursor value to get records after" } }, { "name": "options[before]", "in": "query", "schema": { "type": "string", "maxLength": 24, "description": "Cursor value to get records before" } }, { "name": "options[updatedAt]", "in": "query", "schema": { "type": "string", "maxLength": 30, "description": "Use updatedAt when sorting by first or last updated" } }, { "name": "options[token]", "in": "query", "schema": { "type": "string", "maxLength": 1000, "example": "options[token]=eyJza2lwIjoyMCwibGlABDFRffewfQ==", "description": "Pagination token" } } ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream", "clip" ], "description": "Type of a post (ex. text, image, file, video, clip or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "description": "Body of a post. Can be different types based on content type.", "oneOf": [ { "type": "object", "title": "normal post", "description": "Standard post data (text, image, file, video)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, { "type": "object", "title": "clip post", "description": "clip post data", "properties": { "fileId": { "type": "string", "description": "file key on cloud storage." }, "thumbnailId": { "type": "string", "description": "thumbnail file id." }, "isMuted": { "type": "boolean", "description": "whether the video is muted.", "default": false }, "displayMode": { "type": "string", "description": "display mode for the video.", "enum": [ "fill", "fit" ], "default": "fill" } } } ] }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "video_content" }, "example": [ "video_content", "clips_feature", "multimedia_posts", "next_gen_social" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "mobile_app" }, "example": [ "mobile_app", "user_experience", "API_v4", "social_platform" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/semantic-search/posts": { "get": { "summary": "Semantic search posts", "tags": [ "Semantic Search" ], "security": [ { "BearerAuth": [] } ], "description": "Semantic search posts\n", "parameters": [ { "name": "query", "required": true, "in": "query", "schema": { "type": "string", "maxLength": 1024 } }, { "name": "targetId", "in": "query", "schema": { "type": "string", "maxLength": 900 } }, { "name": "targetType", "in": "query", "schema": { "type": "string", "enum": [ "community", "user", "content" ] } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 }, "token": { "type": "string", "maxLength": 1000 } } } }, { "name": "dataTypes", "in": "query", "description": "Child post data type to filter. Only applied if the option `matchingOnlyParentPost` is `false`. The value in array could be oneOf:\n * `text`\n * `image`\n", "schema": { "type": "array", "maxItems": 10, "items": { "oneOf": [ { "type": "string", "enum": [ "text", "image" ], "description": "Child post data type to filter. Only applied if the option `matchingOnlyParentPost` is `false`" } ] } } }, { "name": "tags", "in": "query", "schema": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } } }, { "name": "matchingOnlyParentPost", "in": "query", "schema": { "type": "boolean", "default": true }, "description": "An option whether to filter only parent post or not. If `true` will return only parent posts, else will return both parent and child posts" } ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "searchResults": { "description": "The list of message feed", "type": "array", "items": { "type": "object", "properties": { "postId": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "score": { "type": "number", "description": "Score of matching the search query." } } } }, "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v1/semantic-search/communities": { "get": { "summary": "Semantic search community", "tags": [ "Semantic Search" ], "security": [ { "BearerAuth": [] } ], "description": "Semantic search community\n", "parameters": [ { "name": "query", "required": true, "in": "query", "schema": { "type": "string", "maxLength": 1024 } }, { "name": "filter", "in": "query", "schema": { "type": "string", "enum": [ "all", "member", "notMember" ], "default": "all" }, "description": "Filter community by membership status" }, { "name": "tags", "in": "query", "schema": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } } }, { "name": "categoryIds", "in": "query", "schema": { "type": "array", "minItems": 0, "maxItems": 10, "items": { "type": "string", "maxLength": 128 } } }, { "name": "includeDiscoverablePrivateCommunity", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "Include discoverable private communities in search results" }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 }, "token": { "type": "string", "maxLength": 1000 } } } } ], "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "searchResults": { "description": "Relevance of the search results", "type": "array", "items": { "type": "object", "properties": { "communityId": { "type": "string", "description": "Private ID of a community." }, "score": { "type": "number", "description": "Score of matching the search query." } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/sessions": { "post": { "summary": "Register a session", "deprecated": true, "tags": [ "Session" ], "security": [], "parameters": [ { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string" } } ], "description": "Register a session in order to receive access token to perform sdk operations.\n", "requestBody": { "description": "Information about user and devices that he/she use to connect to. If displayName is provide, that user display is updated as well.\n\nIf userId doesn't exists, new user will be created.\n\nauthToken need to pass when network option is set to secure\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string", "minLength": 1, "maxLength": 50 }, "deviceId": { "type": "string", "minLength": 1, "maxLength": 150 }, "deviceInfo": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "ios", "android", "web", "node" ] }, "model": { "type": "string", "maxLength": 100 }, "sdkVersion": { "type": "string", "maxLength": 30 } } }, "displayName": { "type": "string", "maxLength": 100 }, "authToken": { "type": "string", "description": "Authentication token from /api/v3/authentication/token", "minLength": 1, "maxLength": 100 } }, "required": [ "userId", "deviceId" ] } } } }, "responses": { "200": { "description": "Session Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "accessToken": { "type": "string" }, "refreshToken": { "type": "string" }, "issuedAt": { "type": "string" }, "expiresAt": { "type": "string" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "lastCachePurge": { "type": "string", "description": "Date of the last cache purge" } } } } } }, "401": { "description": "User is banned from the system.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400100, "message": "User is banned from the system." } } } }, "403": { "description": "User is global banned.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400312, "message": "User is global banned." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Verify access token", "tags": [ "Session" ], "description": "Verify access token. The caller must add accessToken in header.", "responses": { "200": { "description": "Session Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "lastCachePurge": { "type": "string", "description": "Date of the last cache purge" } } } } } }, "401": { "description": "Access token is invalid or expired" }, "403": { "description": "User is global banned" }, "404": { "description": "Not found" }, "422": { "description": "Parameters validation error" } }, "security": [ { "BearerAuth": [] } ] } }, "/api/v4/sessions": { "post": { "summary": "Register a session", "tags": [ "Session" ], "security": [], "parameters": [ { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string" } } ], "description": "Register a session in order receive access token to perform sdk operations.\n", "requestBody": { "description": "Information about user and devices that he/she use to connect to. If displayName is provide, that user display is updated as well.\n\nIf userId doesn't exists, new user will be created.\n\nauthToken need to pass when network option is set to secure\n\naccessToken expiry 30 days\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string", "minLength": 1, "maxLength": 50 }, "deviceId": { "type": "string", "minLength": 1, "maxLength": 150 }, "deviceInfo": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "ios", "android", "web", "node" ] }, "model": { "type": "string", "maxLength": 100 }, "sdkVersion": { "type": "string", "maxLength": 30 } } }, "displayName": { "type": "string", "maxLength": 100 }, "profileHandle": { "type": "string", "maxLength": 100 }, "authToken": { "type": "string", "description": "Authentication token from /api/v3/authentication/token", "minLength": 1, "maxLength": 100 } }, "required": [ "userId", "deviceId" ] } } } }, "responses": { "200": { "description": "Session Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "accessToken": { "type": "string" }, "refreshToken": { "type": "string" }, "issuedAt": { "type": "string" }, "expiresAt": { "type": "string" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "lastCachePurge": { "type": "string", "description": "Date of the last cache purge" } } } } } }, "401": { "description": "User is banned from the system.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400100, "message": "User is banned from the system." } } } }, "403": { "description": "User is global banned.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400312, "message": "User is global banned." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Revoke access token", "tags": [ "Session" ], "security": [ { "BearerAuth": [] } ], "description": "Revoke an access token. If the userId is provided, this will revoke all access tokens of that user. Only admin can revoke all access tokens of a user.", "parameters": [ { "in": "query", "name": "userId", "schema": { "type": "string", "minLength": 1, "maxLength": 50 }, "description": "User id for revocation" }, { "in": "query", "name": "isPublic", "schema": { "type": "boolean", "default": true }, "description": "A flag indicating whether the userId is a public id or not" } ], "responses": { "200": { "description": "Revoke access token success", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "default": true } } } } } }, "403": { "description": "User is global banned.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400312, "message": "User is global banned." } } } }, "404": { "description": "UserId Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "userId Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/sessions/users/{userId}": { "delete": { "summary": "Revoke all user's access tokens by admin", "tags": [ "Session" ], "security": [ { "BearerAuth": [] } ], "description": "Revoke all user's access tokens by admin", "parameters": [ { "in": "path", "required": true, "name": "userId", "schema": { "type": "string", "minLength": 1, "maxLength": 50 }, "description": "User id for revocation" }, { "in": "query", "name": "isPublic", "schema": { "type": "boolean", "default": true }, "description": "A flag indicating whether the userId is a public id or not" } ], "responses": { "200": { "description": "Revoke access token success", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "default": true } } } } } }, "403": { "description": "User is global banned.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400312, "message": "User is global banned." } } } }, "404": { "description": "UserId Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "userId Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v5/sessions": { "post": { "summary": "Register a session", "tags": [ "Session" ], "security": [], "parameters": [ { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string" }, "description": "API key for network authentication" } ], "description": "Register a session in order to receive access token to perform SDK operations. This is the latest version with enhanced session management capabilities.", "requestBody": { "description": "Information about user and devices that they use to connect. If displayName is provided, the user's display name is updated as well.\n\nIf userId doesn't exist, a new user will be created.\n\nauthToken needs to be passed when network option is set to secure.\n\naccessToken expires in 30 days by default.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string", "minLength": 1, "maxLength": 50, "description": "Unique identifier for the user. Cannot start with 'ADMIN_' or 'DELETED_' prefixes." }, "deviceId": { "type": "string", "minLength": 1, "maxLength": 150, "description": "Unique identifier for the device" }, "deviceInfo": { "type": "object", "description": "Optional device information for analytics and debugging", "properties": { "kind": { "type": "string", "enum": [ "ios", "android", "web", "node" ], "description": "Type of device/platform" }, "model": { "type": "string", "maxLength": 300, "description": "Device model information" }, "sdkVersion": { "type": "string", "maxLength": 30, "description": "SDK version being used" } } }, "displayName": { "type": "string", "maxLength": 100, "description": "User's display name (optional, will update user if provided)" }, "profileHandle": { "type": "string", "maxLength": 100, "description": "User's profile handle (optional, will update user if provided)" }, "authToken": { "type": "string", "description": "Authentication token from /api/v3/authentication/token or /api/v4/authentication/token (required for secure networks)", "minLength": 1, "maxLength": 100 } }, "required": [ "userId", "deviceId" ] } } } }, "responses": { "200": { "description": "Session Information with access token and user data", "content": { "application/json": { "schema": { "type": "object", "properties": { "accessToken": { "type": "string", "description": "JWT access token for API authentication" }, "issuedAt": { "type": "string", "format": "date-time", "description": "Token issuance timestamp" }, "expiresAt": { "type": "string", "format": "date-time", "description": "Token expiration timestamp" }, "users": { "type": "array", "description": "User information array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "description": "User roles array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "description": "Associated files array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "lastCachePurge": { "type": "string", "format": "date-time", "description": "Date of the last cache purge" }, "userType": { "type": "string", "description": "Type of user (e.g., signed-in, visitor, bot)", "example": "signed-in", "enum": [ "signed-in", "visitor", "bot" ] } }, "required": [ "accessToken", "issuedAt", "expiresAt", "users" ] } } } }, "401": { "description": "User is banned from the system.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400100, "message": "User is banned from the system." } } } }, "403": { "description": "User is global banned.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400312, "message": "User is global banned." } } } }, "422": { "description": "Put a wrong request parameters.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters error.", "data": { "detail": [ "The 'data.text' field length must be less than or equal to 20000 characters long." ] } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v5/sessions/visitor": { "post": { "summary": "Register a visitor session", "tags": [ "Session" ], "security": [], "parameters": [ { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string" }, "description": "API key for network authentication" } ], "description": "Register a visitor session for read-only access. Visitor users can only consume public content and cannot perform write operations.", "requestBody": { "description": "Information about visitor user and devices that they use to connect. Visitor users have read-only access and cannot perform write operations.\n\nIf deviceId haven't been used before, a new visitor user will be created.\n\naccessToken expires in 30 days by default.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "deviceId": { "type": "string", "minLength": 1, "maxLength": 150, "description": "Unique identifier for the device" }, "deviceInfo": { "type": "object", "description": "Optional device information for analytics and debugging", "properties": { "kind": { "type": "string", "enum": [ "ios", "android", "web", "node" ], "description": "Type of device/platform" }, "model": { "type": "string", "maxLength": 300, "description": "Device model information" }, "sdkVersion": { "type": "string", "maxLength": 30, "description": "SDK version being used" } } }, "authSignature": { "type": "string", "description": "Authentication signature for visitor user (required for secure visitor sessions only)\n\nThe signature must be created using HMAC-SHA256 and returned as hexadecimal:\n```\nHMAC-SHA256(payload, applicationSecret)\n```\n\nSteps to generate:\n1. Create HMAC-SHA256 hash using payload as message and applicationSecret as key.

Payload format: deviceId=deviceId&authSignatureExpiresAt=authSignatureExpiresAt

Device id and authSignatureExpiresAt must match the values sent in the request.\n\n2. Convert the resulting hash to hexadecimal string (64 characters)\n\nThe applicationSecret can be found in the console at Feature settings > User section when enabling secure visitor sessions.\n", "minLength": 64, "maxLength": 64 }, "authSignatureExpiresAt": { "type": "string", "example": "2024-12-31T23:59:59Z", "description": "ISO 8601 timestamp indicating when the authSignature expires (required for secure visitor sessions only)" } }, "required": [ "deviceId" ] } } } }, "responses": { "200": { "description": "Session Information with access token and user data", "content": { "application/json": { "schema": { "type": "object", "properties": { "accessToken": { "type": "string", "description": "JWT access token for API authentication" }, "issuedAt": { "type": "string", "format": "date-time", "description": "Token issuance timestamp" }, "expiresAt": { "type": "string", "format": "date-time", "description": "Token expiration timestamp" }, "users": { "type": "array", "description": "User information array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "description": "User roles array", "example": [], "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "description": "Associated files array", "example": [], "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "lastCachePurge": { "type": "string", "format": "date-time", "description": "Date of the last cache purge" }, "userType": { "type": "string", "description": "Type of user (e.g., signed-in, visitor, bot)", "example": "visitor", "enum": [ "signed-in", "visitor", "bot" ] } }, "required": [ "accessToken", "issuedAt", "expiresAt", "users" ] } } } }, "401": { "description": "User is banned from the system.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400100, "message": "User is banned from the system." } } } }, "403": { "description": "User is global banned.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400312, "message": "User is global banned." } } } }, "422": { "description": "Put a wrong request parameters.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters error.", "data": { "detail": [ "The 'data.text' field length must be less than or equal to 20000 characters long." ] } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v5/sessions/bot": { "post": { "summary": "Register a bot session", "tags": [ "Session" ], "security": [], "parameters": [ { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string" }, "description": "API key for network authentication" } ], "description": "Register a bot session for SEO crawlers. Bot users have read-only access and are optimized for SEO crawling.", "requestBody": { "description": "Information about bot user and devices that they use to connect. Bot users have read-only access and are typically used for SEO crawlers and automated systems.\n\naccessToken expires in 30 days by default.\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "deviceId": { "type": "string", "minLength": 1, "maxLength": 150, "description": "Unique identifier for the device" }, "deviceInfo": { "type": "object", "description": "Optional device information for analytics and debugging", "properties": { "kind": { "type": "string", "enum": [ "ios", "android", "web", "node" ], "description": "Type of device/platform" }, "model": { "type": "string", "maxLength": 300, "description": "Device model information" }, "sdkVersion": { "type": "string", "maxLength": 30, "description": "SDK version being used" } } } }, "required": [ "deviceId" ] } } } }, "responses": { "200": { "description": "Session Information with access token and user data", "content": { "application/json": { "schema": { "type": "object", "properties": { "accessToken": { "type": "string", "description": "JWT access token for API authentication" }, "issuedAt": { "type": "string", "format": "date-time", "description": "Token issuance timestamp" }, "expiresAt": { "type": "string", "format": "date-time", "description": "Token expiration timestamp" }, "users": { "type": "array", "description": "User information array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "description": "User roles array", "example": [], "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "description": "Associated files array", "example": [], "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "lastCachePurge": { "type": "string", "format": "date-time", "description": "Date of the last cache purge" }, "userType": { "type": "string", "description": "Type of user (e.g., signed-in, visitor, bot)", "example": "bot", "enum": [ "signed-in", "visitor", "bot" ] } }, "required": [ "accessToken", "issuedAt", "expiresAt", "users" ] } } } }, "401": { "description": "User is banned from the system.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400100, "message": "User is banned from the system." } } } }, "403": { "description": "User is global banned.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400312, "message": "User is global banned." } } } }, "422": { "description": "Put a wrong request parameters.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters error.", "data": { "detail": [ "The 'data.text' field length must be less than or equal to 20000 characters long." ] } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/stories": { "post": { "summary": "Create a story", "description": "Create a story", "tags": [ "Story" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "text data (required if dataType is text)", "example": "example text" }, "fileId": { "type": "string", "description": "image or video file id (required if dataType is image or video)" }, "imageDisplayMode": { "type": "string", "description": "image display mode (required if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" } } }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of items contained in story. Currently only support hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10 }, "targetType": { "type": "string", "enum": [ "community" ], "description": "where to create story to. currently limited to community only" }, "targetId": { "type": "string", "example": "public_community_id", "description": "Resource public id depends on target type (ex. target type is community, target id will be community public id)" }, "metadata": { "type": "object", "description": "Metadata of the story. The size of this object must be less than 5 KB", "example": { "anything": "you want" } }, "referenceId": { "type": "string", "description": "the id used for reference when optimistically create the story" } }, "required": [ "data", "dataType", "targetId", "targetType", "referenceId" ] } } } }, "responses": { "200": { "description": "Create Result", "content": { "application/json": { "schema": { "description": "Create story response payload", "type": "object", "properties": { "stories": { "type": "array", "items": { "allOf": [ { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] }, { "type": "object", "properties": { "referenceId": { "type": "string", "description": "the id used for reference when optimistically create the story. only avaliable in create story API" } } } ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "User reaches daily quota": { "value": { "status": "error", "code": 400000, "message": "You have reached your daily story creation quota. You can delete an existing story or wait for a story to expire before creating a new one" } }, "Target reaches quota": { "value": { "status": "error", "code": 400000, "message": "This community has reached its daily story creation quota. Please try again later." } }, "Text is required in story type text": { "value": { "status": "error", "code": 400000, "message": "Text is required in data object." } }, "File ID is required in story type media": { "value": { "status": "error", "code": 400000, "message": "File is required in data object." } }, "URL is required in hyperlink item.": { "value": { "status": "error", "code": 400000, "message": "url is required in hyperlink item." } }, "Invalid url format in hyperlink item (no TLD or else)": { "value": { "status": "error", "code": 400000, "message": "Invalid url format in hyperlink item." } }, "Target not found.": { "value": { "status": "error", "code": 400000, "message": "Community not found." } }, "Target is deleted.": { "value": { "status": "error", "code": 400000, "message": "The community has been deleted." } } } } } }, "403": { "description": "No permission to create story.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Have no permission in community to create a story": { "value": { "status": "error", "code": 400300, "message": "You are not allowed to do this" } }, "URL provided in an item is not in the whitelist": { "value": { "status": "error", "code": 400309, "message": "Link is not allowed" } } } } } }, "422": { "description": "Parameters Validation Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters Validation Error!" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "Query stories by target", "description": "Query stories by target", "tags": [ "Story" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "targetId", "in": "query", "required": true, "schema": { "type": "string", "maxLength": 900 } }, { "name": "targetType", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "community", "user" ] } }, { "name": "dataType", "in": "query", "schema": { "description": "Type of data contained in the story. Only admin can query with this parameter.", "type": "string", "enum": [ "image", "video" ] } }, { "name": "isExpired", "in": "query", "schema": { "description": "Whether to include expired stories. Only admin can query with this parameter = true.\n", "type": "boolean", "default": false } }, { "name": "options", "in": "query", "schema": { "type": "object", "properties": { "sortBy": { "type": "string", "default": "createdAt", "enum": [ "createdAt" ] }, "orderBy": { "type": "string", "default": "desc", "enum": [ "asc", "desc" ] }, "limit": { "type": "integer", "default": 10, "minimum": 1, "maximum": 100 }, "token": { "type": "string" } } } } ], "responses": { "200": { "description": "Story Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "description": "Story response payload", "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } }, { "type": "object", "properties": { "storyTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Type of a target (user, community, content)." }, "lastStoryExpiresAt": { "type": "string", "description": "The expired date/time of the latest story created in target. Provided if there is any active story in target.", "format": "date-time" }, "lastStorySeenExpiresAt": { "type": "string", "description": "The expired date/time of the latest story the user has seen. Provided if user has seen any story in target.", "format": "date-time" }, "targetUpdatedAt": { "type": "string", "description": "The date/time when a target is updated. Used for validating the seen state on SDK side", "format": "date-time" } }, "required": [ "targetId", "targetPublicId", "targetType", "targetUpdatedAt" ] } } } } ] }, { "type": "object", "properties": { "paging": { "type": "object", "properties": { "next": { "type": "string", "description": "The next token to get the next page of stories." }, "previous": { "type": "string", "description": "The previous token to get the previous page of stories." } } } } } ] } } } }, "403": { "description": "Forbidden Error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400301, "message": "User xxx is not community xxx member" } } } }, "404": { "description": "Target not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "CommunityId xxx not found" } } } }, "422": { "description": "Parameters Validation Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters Validation Error!" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/stories/count": { "get": { "summary": "Count stories by target", "description": "Count stories by target which includes both active and expired stories. Only admin can use this API.", "tags": [ "Story" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "targetId", "in": "query", "required": true, "schema": { "type": "string", "maxLength": 900 } }, { "name": "targetType", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "community", "user" ] } } ], "responses": { "200": { "description": "Story Count", "content": { "application/json": { "schema": { "type": "object", "properties": { "count": { "type": "integer", "example": 10 } } } } } }, "404": { "description": "Target not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "CommunityId xxx not found" } } } }, "422": { "description": "Parameters Validation Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters Validation Error!" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/stories/seen": { "get": { "summary": "Query story targets by multiple targets", "description": "Query story targets by multiple targets", "tags": [ "Story" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "targets", "description": "Target object. The target object is an array of objects that contain targetId and targetType. Max up to 10 items\n * targetId: ID of a target.\n * targetType: Type of a target (user, community).\n", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "maxLength": 900 }, "targetType": { "type": "string", "enum": [ "community", "user" ] } } }, "maxItems": 10, "minItems": 1 } } ], "responses": { "200": { "description": "Story targets Information", "content": { "application/json": { "schema": { "description": "Story targets response payload", "type": "object", "properties": { "storyTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Type of a target (user, community, content)." }, "lastStoryExpiresAt": { "type": "string", "description": "The expired date/time of the latest story created in target. Provided if there is any active story in target.", "format": "date-time" }, "lastStorySeenExpiresAt": { "type": "string", "description": "The expired date/time of the latest story the user has seen. Provided if user has seen any story in target.", "format": "date-time" }, "targetUpdatedAt": { "type": "string", "description": "The date/time when a target is updated. Used for validating the seen state on SDK side", "format": "date-time" } }, "required": [ "targetId", "targetPublicId", "targetType", "targetUpdatedAt" ] } } } } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Target not found.": { "value": { "status": "error", "code": 400000, "message": "Community not found." } }, "Target is deleted.": { "value": { "status": "error", "code": 400000, "message": "The community has been deleted." } } } } } }, "422": { "description": "Parameters Validation Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters Validation Error!" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/stories-by-targets": { "get": { "summary": "Query stories by multiple targets", "description": "Query stories by multiple targets", "tags": [ "Story" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "targets", "description": "Target object. The target object is an array of objects that contain targetId and targetType. Max up to 10 items\n * targetId: ID of a target.\n * targetType: Type of a target (user, community).\n", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "maxLength": 900 }, "targetType": { "type": "string", "enum": [ "community", "user" ] } } }, "maxItems": 10, "minItems": 1 } }, { "name": "options", "in": "query", "schema": { "type": "object", "properties": { "sortBy": { "type": "string", "default": "createdAt", "enum": [ "createdAt" ] }, "orderBy": { "type": "string", "default": "desc", "enum": [ "asc", "desc" ] }, "limit": { "type": "integer", "default": 10, "minimum": 1, "maximum": 100 }, "token": { "type": "string" } } } } ], "responses": { "200": { "description": "Story Information, sorted by the target order in the request then the sort option", "content": { "application/json": { "schema": { "allOf": [ { "description": "Story response payload", "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } }, { "type": "object", "properties": { "storyTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Type of a target (user, community, content)." }, "lastStoryExpiresAt": { "type": "string", "description": "The expired date/time of the latest story created in target. Provided if there is any active story in target.", "format": "date-time" }, "lastStorySeenExpiresAt": { "type": "string", "description": "The expired date/time of the latest story the user has seen. Provided if user has seen any story in target.", "format": "date-time" }, "targetUpdatedAt": { "type": "string", "description": "The date/time when a target is updated. Used for validating the seen state on SDK side", "format": "date-time" } }, "required": [ "targetId", "targetPublicId", "targetType", "targetUpdatedAt" ] } } } } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Target not found.": { "value": { "status": "error", "code": 400000, "message": "Community not found." } }, "Target is deleted.": { "value": { "status": "error", "code": 400000, "message": "The community has been deleted." } } } } } }, "422": { "description": "Parameters Validation Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Parameters Validation Error!" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/stories/{storyId}": { "get": { "description": "Get a story", "summary": "Get a story", "tags": [ "Story" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-f\\d]{24}$" } } ], "responses": { "200": { "description": "Story Information", "content": { "application/json": { "schema": { "description": "Story response payload", "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } } } } }, "403": { "description": "Forbidden Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "User xxx is not community xxx member" } } } }, "404": { "description": "Story not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Story not found" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "description": "Delete a story", "summary": "Delete a story", "tags": [ "Story" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-f\\d]{24}$" } }, { "name": "permanent", "in": "query", "required": false, "description": "If true, the story will be deleted permanently (hard deleted). If false, the story will be soft deleted.\n", "schema": { "type": "boolean", "default": false } } ], "responses": { "200": { "description": "Delete Result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "403": { "description": "Forbidden Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "You are not allowed to do this" } } } }, "404": { "description": "Story not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Story not found" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/stories/{storyId}/flags": { "post": { "description": "Flag a story", "summary": "Flag a story", "tags": [ "Story" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-f\\d]{24}$" } } ], "responses": { "200": { "description": "Story Information", "content": { "application/json": { "schema": { "description": "Story response payload", "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } } } } }, "403": { "description": "Forbidden error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Story creators cannot flag their own story.": { "value": { "status": "error", "code": 400301, "message": "Story creators cannot flag their own story." } }, "Number of flags already exceed.": { "value": { "status": "error", "code": 400301, "message": "Number of flags already exceed." } } } } } }, "404": { "description": "Story not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Story not found" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "description": "Unflag a story", "summary": "Unflag a story", "tags": [ "Story" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-f\\d]{24}$" } } ], "responses": { "200": { "description": "Story Information", "content": { "application/json": { "schema": { "description": "Story response payload", "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } } } } }, "403": { "description": "Forbidden error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Story creators cannot unflag their own story.": { "value": { "status": "error", "code": 400301, "message": "Story creators cannot unflag their own story." } }, "You never send a flag to this story.": { "value": { "status": "error", "code": 400301, "message": "You never send a flag to this story." } } } } } }, "404": { "description": "Story not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Story not found" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/stories/{storyId}/flags/all": { "delete": { "description": "Clear all flags in a story. Only admin can use this API.", "summary": "Clear all flags in a story.", "tags": [ "Story" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-f\\d]{24}$" } } ], "responses": { "200": { "description": "Story Information", "content": { "application/json": { "schema": { "description": "Story response payload", "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } } } } }, "403": { "description": "Forbidden error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "examples": { "Only admin can clear flags": { "value": { "status": "error", "code": 400301, "message": "You are not allowed to do this." } } } } } }, "404": { "description": "Story not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Story not found" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v5/me/global-story-targets": { "get": { "summary": "Get global story targets", "description": "Get global story targets. Return a list of story targets", "tags": [ "Story" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "seenState", "in": "query", "description": "the seen state option used for filter the seen/unseen story targets", "schema": { "type": "string", "enum": [ "all", "seen", "unseen" ], "default": "unseen" } }, { "name": "limit", "in": "query", "description": "the amount of story targets per query", "required": false, "schema": { "type": "integer", "default": 10, "minimum": 1, "maximum": 100 } }, { "name": "token", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 900 } } ], "responses": { "200": { "description": "Global Story Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "storyTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Type of a target (user, community, content)." }, "lastStoryExpiresAt": { "type": "string", "description": "The expired date/time of the latest story created in target. Provided if there is any active story in target.", "format": "date-time" }, "lastStorySeenExpiresAt": { "type": "string", "description": "The expired date/time of the latest story the user has seen. Provided if user has seen any story in target.", "format": "date-time" }, "targetUpdatedAt": { "type": "string", "description": "The date/time when a target is updated. Used for validating the seen state on SDK side", "format": "date-time" } }, "required": [ "targetId", "targetPublicId", "targetType", "targetUpdatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string", "description": "The next token to get the next page of stories." }, "previous": { "type": "string", "description": "The previous token to get the previous page of stories." } } } } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/users/{userId}": { "get": { "summary": "Get a User", "tags": [ "User" ], "security": [ { "BearerAuth": [] } ], "description": "Get a User.\n", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } }, { "name": "type", "in": "query", "schema": { "type": "string", "enum": [ "public", "internal" ], "default": "public" } } ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/users/list": { "get": { "summary": "Get Users", "tags": [ "User" ], "security": [ { "BearerAuth": [] } ], "description": "Get list of users by user ids.\n", "parameters": [ { "name": "userIds", "in": "query", "required": true, "schema": { "type": "array", "maxItems": 100, "items": { "type": "string", "maxLength": 900 } } } ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/users": { "get": { "summary": "Query Users", "tags": [ "User" ], "security": [ { "BearerAuth": [] } ], "description": "Retrieves a paginated list of users with advanced filtering capabilities.
\nSupports searching by userId, displayName, or profileHandle with different matching strategies.\n", "parameters": [ { "name": "keyword", "in": "query", "schema": { "type": "string", "maxLength": 100 }, "description": "Keyword to search for in user information such as displayName, profileHandle, and userId. The search is case-insensitive and supports partial matches." }, { "name": "exactMatchKeyword", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "Return exact match search result when true" }, { "name": "filter", "in": "query", "schema": { "type": "string", "enum": [ "all", "flagged" ], "default": "all" }, "description": "Filter users either by all users or only flagged users" }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "firstCreated", "lastCreated", "displayName", "profileHandle" ], "default": "displayName" }, "examples": { "lastCreated": { "summary": "Sort by creation date (newest first)", "value": "lastCreated" }, "displayName": { "summary": "Sort by display name (alphabetical order)", "value": "displayName" } }, "description": "Sort users by specified criteria default to `displayName`.\n" }, { "name": "searchBy", "in": "query", "schema": { "type": "array", "maxItems": 3, "items": { "type": "string", "enum": [ "displayName", "profileHandle", "userId" ], "default": [ "displayName", "profileHandle", "userId" ] } }, "examples": { "singleField": { "summary": "Search by display name", "value": [ "displayName" ] }, "multipleFields": { "summary": "Search by userId and profileHandle", "value": [ "userId", "profileHandle" ] } }, "description": "Fields to search users for the keyword **(must be used with a keyword parameter)**, Default is all three fields
\n * `displayName` - Search by display name. When using with `sortBy` parameter the applicable sort order is `displayName`, `lastCreated` or `firstCreated`. Default to `displayName`.
\n * `profileHandle` - Search by profile handle, when using with `sortBy` parameter the applicable sort order is `profileHandle`, `lastCreated` or `firstCreated`. Default to `profileHandle`.
\n * `userId` - Search by user id, when using with `sortBy` parameter the applicable sort order is `lastCreated`, `firstCreated` or `displayName`. Default to `displayName`.
\n Default is all three fields\n" }, { "name": "options[limit]", "in": "query", "description": "Number of results per page (1-100)", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 } }, { "name": "options[token]", "in": "query", "description": "Pagination token for getting next/previous pages", "schema": { "type": "string", "maxLength": 100 } }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": false }, "description": "filter only deleted users when true" } ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "paging": { "type": "object", "properties": { "next": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "Update a User", "tags": [ "User" ], "security": [ { "BearerAuth": [] } ], "description": "Update user such as displayName, roles, avatar and metadata\n", "requestBody": { "description": "User to be updated\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string", "maxLength": 50 }, "displayName": { "type": "string", "maxLength": 100 }, "profileHandle": { "type": "string", "maxLength": 100 }, "roles": { "type": "array", "description": "Only administrator can update system roles (moderator and admin)", "maxItems": 10, "items": { "type": "string", "maxLength": 100 } }, "metadata": { "type": "object", "description": "User metadata (max: 5,000 bytes)\n" }, "avatarFileId": { "type": "string", "maxLength": 50 }, "avatarCustomUrl": { "type": "string", "maxLength": 1000 }, "description": { "type": "string", "maxLength": 500 } } } } } }, "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "403": { "description": "No permission to access this resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400300, "message": "Forbidden error." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/users/{userId}/isFlagByMe": { "get": { "summary": "Check whether User Flagged a given User", "description": "Check whether User flagged a given User.", "tags": [ "User" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 900 } } ], "responses": { "200": { "description": "Is flag by me response.", "content": { "application/json": { "schema": { "type": "object", "properties": { "isFlagByMe": { "type": "boolean" } } } } } }, "404": { "description": "User Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "User Not Found." } } } } } } }, "/api/v4/me/user-blocks": { "get": { "summary": "Get Blocked Users", "description": "Get Blocked Users\n", "tags": [ "User" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 } }, { "name": "token", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Get blockedU uer list response", "content": { "application/json": { "schema": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "blocked", "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string", "description": "token for getting the next page of data", "maxLength": 100 }, "previous": { "type": "string", "description": "token for getting the previous page of data", "maxLength": 100 }, "total": { "type": "number", "description": "total number of blockers" } } } } } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v2/users/ban": { "post": { "summary": "Ban a User", "tags": [ "User" ], "security": [ { "ApiKeyAuth": [] } ], "description": "Ban a User\n", "requestBody": { "description": "User to be baned\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string" } }, "required": [ "userId" ] } } } }, "responses": { "200": { "description": "OK" }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v2/users/unban": { "post": { "summary": "Unban a User", "tags": [ "User" ], "security": [ { "BearerAuth": [] } ], "description": "Unban a User\n", "requestBody": { "description": "User to be unbanned\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string" } }, "required": [ "userId" ] } } } }, "responses": { "200": { "description": "OK" }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/me/flags/{userId}": { "post": { "summary": "Report a User", "security": [ { "BearerAuth": [] } ], "tags": [ "User" ], "parameters": [ { "in": "path", "name": "userId", "required": true, "schema": { "type": "string", "minimum": 1, "maximum": 50 }, "description": "User public id" } ], "description": "Report a User by User ID (Flag User).\n", "responses": { "200": { "description": "Flag user response", "content": { "application/json": { "schema": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "User Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "User Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Unreported a User", "security": [ { "BearerAuth": [] } ], "tags": [ "User" ], "parameters": [ { "in": "path", "name": "userId", "required": true, "schema": { "type": "string", "minimum": 1, "maximum": 50 }, "description": "User public id" } ], "description": "Unreported a User by User ID (Unflag User).\n", "responses": { "200": { "description": "Unflag user response", "content": { "application/json": { "schema": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "User Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "User Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v2/users/{userId}/flags": { "delete": { "summary": "Clear Flag a User", "tags": [ "User" ], "security": [ { "BearerAuth": [] } ], "description": "Clear Flag a User\n", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "429": { "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400311, "message": "RateLimit Exceed." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/users/{userId}": { "delete": { "summary": "Delete a User", "security": [ { "BearerAuth": [] } ], "tags": [ "User" ], "parameters": [ { "in": "path", "name": "userId", "required": true, "schema": { "type": "string", "minimum": 1, "maximum": 50 }, "description": "User public id" }, { "in": "query", "name": "deleteAll", "schema": { "type": "boolean", "default": false }, "description": "true - it will hard delete this user created channels, messages, comments, posts, polls, reactions after user is deleted." }, { "in": "query", "name": "markMessageDeleted", "schema": { "type": "boolean", "default": false }, "description": "true - it will hard delete this user messages after user is deleted." }, { "in": "query", "name": "hardDeletePost", "schema": { "type": "boolean", "default": false }, "description": "true - it will hard delete this user posts after user is deleted." }, { "in": "query", "name": "hardDeleteComment", "schema": { "type": "boolean", "default": false }, "description": "true - it will hard delete this user comments after user is deleted." } ], "responses": { "200": { "description": "return success:'true' when deletion is successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "example": true } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "User is already deleted" } } } }, "404": { "description": "User Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "User Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v4/me/user-blocks/{userId}": { "post": { "summary": "Block a User", "tags": [ "User" ], "description": "Block a User\n", "security": [ { "BearerAuth": [] } ], "parameters": [ { "in": "path", "name": "userId", "required": true, "schema": { "type": "string", "minimum": 1, "maximum": 50 }, "description": "User public id" } ], "responses": { "200": { "description": "Block user response", "content": { "application/json": { "schema": { "type": "object", "required": [ "follows", "followCounts" ], "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "blocked", "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "followCounts": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "followerCount": { "type": "integer" }, "followingCount": { "type": "integer" }, "pendingCount": { "type": "integer" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "User Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "User Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "Unblock a User", "tags": [ "User" ], "description": "Unblock a User\n", "security": [ { "BearerAuth": [] } ], "parameters": [ { "in": "path", "name": "userId", "required": true, "schema": { "type": "string", "minimum": 1, "maximum": 50 }, "description": "User public id" } ], "responses": { "200": { "description": "Unblock user response", "content": { "application/json": { "schema": { "type": "object", "required": [ "follows", "followCounts" ], "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "blocked", "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "followCounts": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "followerCount": { "type": "integer" }, "followingCount": { "type": "integer" }, "pendingCount": { "type": "integer" } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "User Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "User Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/user-event/video-streaming": { "post": { "summary": "create user event for video streaming", "tags": [ "Video streaming" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "A group of user activity on startTime, endTime and watchSeconds.", "required": true, "content": { "application/json": { "schema": { "required": [ "signature", "nonceStr", "timestamp", "streams" ], "properties": { "signature": { "description": "check detail signature algorithm at https://ekoapp.atlassian.net/wiki/spaces/UP/pages/1685750282/Billing#Signature-Algorithm%3A", "type": "string" }, "nonceStr": { "description": "unique string for each request, max length 50", "type": "string" }, "timestamp": { "description": "timestamp string in UTC format", "type": "string", "example": "2021-03-10T03:07:16.127Z" }, "streams": { "type": "array", "items": { "type": "object", "required": [ "streamId", "startTime", "endTime", "watchSeconds", "resolution" ], "properties": { "sessionId": { "description": "unique sessionId for each user event, max length 50", "type": "string" }, "streamId": { "description": "streamId of video streaming instance, max length 50", "type": "string" }, "startTime": { "description": "timestamp string in UTC format", "type": "string", "example": "2021-03-10T03:07:16.127Z" }, "endTime": { "description": "timestamp string in UTC format", "type": "string", "example": "2021-03-10T03:07:16.127Z" }, "watchSeconds": { "description": "user's watching time in seconds", "type": "number", "example": 120 } } } } } } } } }, "responses": { "200": { "description": "event is processed successfully", "content": { "application/json": { "schema": { "properties": { "ok": { "type": "boolean", "example": true } } } } } }, "500": { "description": "Timestamp information mismatch", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "code": "500000,", "message": "Information mismatch", "status": "error" } } } } } } }, "/api/v3/user-event/room": { "post": { "summary": "Store watching time analytic for room", "tags": [ "Room" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "A group of user activity on startTime, endTime and watchSeconds.", "required": true, "content": { "application/json": { "schema": { "required": [ "signature", "nonceStr", "timestamp", "rooms" ], "properties": { "signature": { "description": "RSA-SHA256 signature for request validation. Generated by:\n1. Sort data object keys alphabetically for each room\n2. Create key=value pairs (use ISO 8601 format for timestamps)\n3. Join pairs with '&' within each room\n4. Join multiple rooms with ';'\n5. Create signing string: `nonceStr={nonceStr}×tamp={timestamp}&data={dataStr}==`\n6. Sign with SHA256 using your RSA private key\n7. Base64 encode the signature\n\nExample data string: `endTime=2021-03-10T03:08:16.127Z&roomId=room123&sessionId=session1&startTime=2021-03-10T03:07:16.127Z&watchSeconds=60`\n", "type": "string" }, "nonceStr": { "description": "unique string for each request, max length 50", "type": "string" }, "timestamp": { "description": "timestamp string in UTC format", "type": "string", "example": "2021-03-10T03:07:16.127Z" }, "rooms": { "type": "array", "items": { "type": "object", "required": [ "roomId", "startTime", "endTime", "watchSeconds" ], "properties": { "sessionId": { "description": "unique sessionId for each user event, max length 50", "type": "string" }, "roomId": { "description": "roomId of room instance, max length 50", "type": "string" }, "startTime": { "description": "timestamp string in UTC format", "type": "string", "example": "2021-03-10T03:07:16.127Z" }, "endTime": { "description": "timestamp string in UTC format", "type": "string", "example": "2021-03-10T03:07:16.127Z" }, "watchSeconds": { "description": "user's watching time in seconds", "type": "number", "example": 120 } } } } } } } } }, "responses": { "200": { "description": "event is processed successfully", "content": { "application/json": { "schema": { "properties": { "ok": { "type": "boolean", "example": true } } } } } }, "500": { "description": "Timestamp information mismatch", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "code": "500000,", "message": "Information mismatch", "status": "error" } } } } } } }, "/api/v3/video-streaming": { "post": { "summary": "create video streaming", "tags": [ "Video streaming" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "description": "Information of video streaming to be created\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "maxLength": 1000 }, "description": { "type": "string", "maxLength": 5000 }, "thumbnailFileId": { "type": "string", "maxLength": 50 }, "metadata": { "type": "object" }, "isSecure": { "type": "boolean", "default": false }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "channelEnabled": { "type": "boolean", "description": "Indicates whether the channel (live chat and live reaction) is enabled for video streaming." }, "parentStreamId": { "type": "string", "description": "Optional parent stream ID. If provided, creates a child stream linked to the parent.", "maxLength": 50 } }, "required": [ "title" ] } } } }, "responses": { "200": { "description": "video streaming information", "content": { "application/json": { "schema": { "properties": { "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamModerations": { "type": "array", "items": { "type": "object", "properties": { "moderationId": { "type": "string", "description": "Moderation id" }, "streamId": { "type": "string", "description": "Streaming id" }, "flagLabels": { "description": "List of flag labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "terminateLabels": { "description": "List of terminate labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "get list of video streaming", "tags": [ "Video streaming" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "isLive", "in": "query", "schema": { "type": "boolean", "default": false } }, { "name": "statuses", "in": "query", "schema": { "type": "array", "maxItems": 10, "items": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ] } }, "description": "Status of livestreaming \n * idle - streaming is just created \n * live - streamer is streaming now or streamer is reconnecting \n * ended - streamer stop streaming or streamer disconnect and not connect back in time period \n * recorded - live stream recordings available \n" }, { "name": "userPublicIds", "in": "query", "schema": { "type": "array", "maxItems": 100, "items": { "type": "string", "maxLength": 50 } } }, { "name": "sortBy", "in": "query", "schema": { "type": "string", "enum": [ "firstCreated", "lastCreated" ] } }, { "name": "isDeleted", "in": "query", "schema": { "type": "boolean", "default": null }, "description": "isDeleted:\n * `null(default)` - Show both video streaming is activated and video streaming is inactivated.\n * `true` - Show video streaming is inactivated only.\n * `false` - Show video streaming is activated only.\n" }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer" }, "skip": { "type": "integer" }, "token": { "type": "string", "maxLength": 1000 } } } } ], "responses": { "200": { "description": "list of video streaming", "content": { "application/json": { "schema": { "properties": { "results": { "type": "object", "properties": { "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamModerations": { "type": "array", "items": { "type": "object", "properties": { "moderationId": { "type": "string", "description": "Moderation id" }, "streamId": { "type": "string", "description": "Streaming id" }, "flagLabels": { "description": "List of flag labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "terminateLabels": { "description": "List of terminate labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "prev": { "type": "string" } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/video-streaming/{streamId}": { "get": { "summary": "get single video-streaming item", "tags": [ "Video streaming" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "in": "path", "name": "streamId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Stream id to update" } ], "responses": { "200": { "description": "video streaming information", "content": { "application/json": { "schema": { "properties": { "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamModerations": { "type": "array", "items": { "type": "object", "properties": { "moderationId": { "type": "string", "description": "Moderation id" }, "streamId": { "type": "string", "description": "Streaming id" }, "flagLabels": { "description": "List of flag labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "terminateLabels": { "description": "List of terminate labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "put": { "summary": "update video streaming", "tags": [ "Video streaming" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "in": "path", "name": "streamId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Stream id to update" } ], "requestBody": { "description": "Information of video streaming to be updated\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "maxLength": 1000 }, "description": { "type": "string", "maxLength": 5000 }, "thumbnailFileId": { "type": "string", "maxLength": 50 }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "channelEnabled": { "type": "boolean", "description": "Indicates whether the channel (live chat and live reaction) is enabled for video streaming." } }, "required": [ "title" ] } } } }, "responses": { "200": { "description": "video streaming information", "content": { "application/json": { "schema": { "properties": { "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamModerations": { "type": "array", "items": { "type": "object", "properties": { "moderationId": { "type": "string", "description": "Moderation id" }, "streamId": { "type": "string", "description": "Streaming id" }, "flagLabels": { "description": "List of flag labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "terminateLabels": { "description": "List of terminate labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "delete video streaming", "tags": [ "Video streaming" ], "security": [ { "BearerAuth": [] } ], "description": "Delete a video streaming\n", "parameters": [ { "in": "path", "name": "streamId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Stream id to update" } ], "responses": { "200": { "description": "video streaming information", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "data": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/video-streaming/{streamId}/streaming-url": { "delete": { "summary": "dispose video streaming url", "tags": [ "Video streaming" ], "security": [ { "ApiKeyAuth": [] } ], "description": "This API will update streaming status to `ended` and dispose apsara streaming url\n", "parameters": [ { "in": "path", "name": "streamId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Stream id to update" } ], "responses": { "200": { "description": "video streaming information", "content": { "application/json": { "schema": { "properties": { "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamModerations": { "type": "array", "items": { "type": "object", "properties": { "moderationId": { "type": "string", "description": "Moderation id" }, "streamId": { "type": "string", "description": "Streaming id" }, "flagLabels": { "description": "List of flag labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "terminateLabels": { "description": "List of terminate labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/video-streaming/{streamId}/viewer-bans": { "post": { "summary": "ban viewers from a live stream", "tags": [ "Video streaming" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "in": "path", "name": "streamId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Stream id to update" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "userIds" ], "properties": { "userIds": { "type": "array", "items": { "type": "string" }, "description": "List of user IDs to ban from the live stream" } } } } } }, "responses": { "200": { "description": "Successfully banned users", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "get": { "summary": "get list of banned viewers", "tags": [ "Video streaming" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "in": "path", "name": "streamId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Stream id to update" } ], "responses": { "200": { "description": "List of banned users", "content": { "application/json": { "schema": { "type": "object", "properties": { "videoStreamingBannedUsers": { "type": "array", "items": { "type": "object", "required": [ "userId", "banBy", "userPublicId", "banByPublicId", "createdAt" ], "properties": { "userId": { "type": "string" }, "banBy": { "type": "string" }, "userPublicId": { "type": "string" }, "banByPublicId": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" } } } }, "videoStreamings": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } }, "videoStreamingChildren": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } }, "videoStreamingModerations": { "type": "object", "properties": { "moderationId": { "type": "string", "description": "Moderation id" }, "streamId": { "type": "string", "description": "Streaming id" }, "flagLabels": { "description": "List of flag labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "terminateLabels": { "description": "List of terminate labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "users": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "communities": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] }, "posts": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "publisherId": { "type": "string", "description": "ID of an original publisher when creating a post as brand." }, "publisherPublicId": { "type": "string", "description": "Public ID of an original publisher when creating a post as brand." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream", "clip" ], "description": "Type of a post (ex. text, image, file, video, clip or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "description": "Body of a post. Can be different types based on content type.", "oneOf": [ { "type": "object", "title": "normal post", "description": "Standard post data (text, image, file, video)", "properties": { "title": { "type": "string", "description": "Title of a post." }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, { "type": "object", "title": "clip post", "description": "clip post data", "properties": { "fileId": { "type": "string", "description": "file key on cloud storage." }, "thumbnailId": { "type": "string", "description": "thumbnail file id." }, "isMuted": { "type": "boolean", "description": "whether the video is muted.", "default": false }, "displayMode": { "type": "string", "description": "display mode for the video.", "enum": [ "fill", "fit" ], "default": "fill" } } } ] }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "video_content" }, "example": [ "video_content", "clips_feature", "multimedia_posts", "next_gen_social" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] }, "files": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" } } } } } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } }, "delete": { "summary": "unban viewers from a live stream", "tags": [ "Video streaming" ], "security": [ { "BearerAuth": [] } ], "parameters": [ { "in": "path", "name": "streamId", "required": true, "schema": { "type": "string", "maxLength": 50 }, "description": "Stream id to update" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "userIds" ], "properties": { "userIds": { "type": "array", "items": { "type": "string" }, "description": "List of user IDs to unban from the live stream" } } } } } }, "responses": { "200": { "description": "Successfully unbanned users", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/api/v3/video-streaming/live": { "get": { "summary": "Query active live video streaming", "tags": [ "Video streaming" ], "security": [ { "BearerAuth": [] } ], "description": "Get video streaming that is currently live\n", "parameters": [ { "name": "targetType", "in": "query", "schema": { "type": "array", "items": { "type": "string", "enum": [ "community", "user", "all" ] }, "default": [ "all" ] } }, { "name": "targetIds", "in": "query", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "options", "in": "query", "style": "deepObject", "schema": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20, "description": "Number of items to return" }, "token": { "type": "string", "description": "Pagination token" } } } } ], "responses": { "200": { "description": "list of live video streaming", "content": { "application/json": { "schema": { "properties": { "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamModerations": { "type": "array", "items": { "type": "object", "properties": { "moderationId": { "type": "string", "description": "Moderation id" }, "streamId": { "type": "string", "description": "Streaming id" }, "flagLabels": { "description": "List of flag labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "terminateLabels": { "description": "List of terminate labels", "type": "array", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "This field is for moderation category names.", "enum": [ "pornography", "violence", "prohibited", "inappropriate", "profanity" ] }, "threshold": { "description": "This field is for flag threshold.", "type": "number" }, "detectedAt": { "type": "string", "format": "date-time" } } } }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "paging": { "type": "object", "properties": { "next": { "type": "string" }, "previous": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400000, "message": "Bad Request." } } } }, "404": { "description": "Resource Not Found error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 400400, "message": "Resource Not Found." } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "detail": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] } } } } }, "example": { "status": "error", "code": 500000, "message": "Unexpected error" } } } } } } }, "/webhook/channel.didAddUsers": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Channel users added webhook", "description": "Send user added event information whenever new member got added to a channel.", "responses": { "200": { "description": "channel is channel information. userIds is a list of added userId. adderId is user who add other user to channel users is a list of user.", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "channel.didAddUsers" ] }, "data": { "type": "object", "properties": { "channel": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatar": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "userIds": { "type": "array", "items": { "type": "string" } }, "adderId": { "type": "string" } } } } } } } } } } }, "/webhook/channel.didBan": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Channel Didban webhook event", "description": "Send channel banned event whenever a channel got banned.", "responses": { "200": { "description": "channel is channel information. userIds is a list of userIds who being banned. actorId is userId who ban other user. users is a list of userInfo", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "channel.didBan" ] }, "data": { "type": "object", "properties": { "channel": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatar": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "actorId": { "type": "string" }, "userIds": { "type": "array", "items": { "type": "string" } } } } } } } } } } } }, "/webhook/channel.didClose": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Channel Didclose webhook event", "description": "Send channel close event information whenever a channel close.", "responses": { "200": { "description": "channel is channel information.", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "channel.didClose" ] }, "data": { "type": "object", "properties": { "channel": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatar": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } } } } } } } } } } } }, "/webhook/channel.didCreate": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Channel Didcreate webhook event", "description": "Send new created channel whenever a channel got create", "responses": { "200": { "description": "channel is channel information. userIds is a list of userId who is added to channel. users is a list of user.", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "channel.didCreate" ] }, "data": { "type": "object", "properties": { "channel": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatar": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "userIds": { "type": "array", "items": { "type": "string" } } } } } } } } } } } }, "/webhook/channel.didJoin": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Channel Didjoin webhook event", "description": "Send join event information whenever a channel got joined", "responses": { "200": { "description": "channel is channel information. userIds is a list of joined userId. users is a list of user.", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "channel.didJoin" ] }, "data": { "type": "object", "properties": { "channel": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatar": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "userIds": { "type": "array", "items": { "type": "string" } } } } } } } } } } } }, "/webhook/channel.didLeave": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Channel Didleave webhook event", "description": "Send channel leave event information whenever someone leave a channel.", "responses": { "200": { "description": "channel is channel information. userIds is a list of userId who leave channel. users is a list of userInfo", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "channel.didLeave" ] }, "data": { "type": "object", "properties": { "channel": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatar": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "userIds": { "type": "array", "items": { "type": "string" } } } } } } } } } } } }, "/webhook/channel.didRemoveUsers": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Channel Didremoveusers webhook event", "description": "Send user removed event information whenever member got remove from channel.", "responses": { "200": { "description": "channel is channel information. userIds is a list of removed userId. removerId is userId who remove other users from channel. users is a list of user.", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "channel.didRemoveUsers" ] }, "data": { "type": "object", "properties": { "channel": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatar": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "userIds": { "type": "array", "items": { "type": "string" } }, "removerId": { "type": "string" } } } } } } } } } } }, "/webhook/channel.didUpdate": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Channel Didupdate webhook event", "description": "Send channel updated event information whenever a channel got updated.", "responses": { "200": { "description": "channel is channel information. userId is a userId who update channel. users is a list of userInfo", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "channel.didUpdate" ] }, "data": { "type": "object", "properties": { "channel": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatar": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "userId": { "type": "string" } } } } } } } } } } }, "/webhook/channel.didUpdateMeta": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Channel Didupdatemeta webhook event", "description": "Send channel's meta data updated event information whenever a channel's meta data got updated.", "responses": { "200": { "description": "channel is channel information. userId is a userId who update channel's meta data. users is a list of userInfo", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "channel.didUpdateMeta" ] }, "data": { "type": "object", "properties": { "channel": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatar": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "userId": { "type": "string" } } } } } } } } } } }, "/webhook/file.didDelete": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "File Diddelete webhook event", "description": "Send deleted file information whenever a file got deleted", "responses": { "200": { "description": "File deleted event information with file details", "content": { "application/json": { "schema": { "type": "object", "properties": { "networkId": { "type": "string", "description": "Network ID where the event occurred" }, "event": { "type": "string", "enum": [ "file.didDelete" ] }, "data": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "example": { "networkId": "6848030d11c7e8b56c3570b5", "event": "file.didDelete", "data": { "fileId": "fileId", "fileUrl": "https://localhost/api/v3/files/fileId/download", "type": "file", "accessType": "public", "altText": null, "createdAt": "1900-01-01T00:00:00.000Z", "updatedAt": "1900-01-01T00:00:00.000Z", "attributes": { "name": "foobar.png", "extension": "png", "size": 8658, "mimeType": "image/png" } } } } } } } } } }, "/webhook/follow.didAcceptRequest": { "get": { "tags": [ "Webhook event" ], "summary": "Follow Didacceptrequest webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a user accepts a follow request from another user.\n", "responses": { "200": { "description": "Follow Object", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "from": { "type": "string" }, "to": { "type": "string" }, "status": { "type": "string", "enum": [ "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } } } } } } }, "/webhook/follow.didCancelRequest": { "get": { "tags": [ "Webhook event" ], "summary": "Follow Didcancelrequest webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a user cancels a request to follow another user.\n", "responses": { "200": { "description": "Follow Object", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "from": { "type": "string" }, "to": { "type": "string" }, "status": { "type": "string", "enum": [ "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } } } } } } }, "/webhook/follow.didCreate": { "get": { "tags": [ "Webhook event" ], "summary": "Follow Didcreate webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a user follows another user.\n", "responses": { "200": { "description": "Follow Object", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "from": { "type": "string" }, "to": { "type": "string" }, "status": { "type": "string", "enum": [ "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } } } } } } }, "/webhook/follow.didDeclineRequest": { "get": { "tags": [ "Webhook event" ], "summary": "Follow Diddeclinerequest webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a user declines a follow request from another user.\n", "responses": { "200": { "description": "Follow Object", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "from": { "type": "string" }, "to": { "type": "string" }, "status": { "type": "string", "enum": [ "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } } } } } } }, "/webhook/follow.didDeleteFollower": { "get": { "tags": [ "Webhook event" ], "summary": "Follow Diddeletefollower webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a user deletes a user from their follower's list.\n", "responses": { "200": { "description": "Follow Object", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "from": { "type": "string" }, "to": { "type": "string" }, "status": { "type": "string", "enum": [ "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } } } } } } }, "/webhook/follow.didRequest": { "get": { "tags": [ "Webhook event" ], "summary": "Follow Didrequest webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a user sends a request to follow another user.\n", "responses": { "200": { "description": "Follow Object", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "from": { "type": "string" }, "to": { "type": "string" }, "status": { "type": "string", "enum": [ "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } } } } } } }, "/webhook/follow.didUnfollow": { "get": { "tags": [ "Webhook event" ], "summary": "Follow Didunfollow webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a user unfollows another user.\n", "responses": { "200": { "description": "Follow Object", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "from": { "type": "string" }, "to": { "type": "string" }, "status": { "type": "string", "enum": [ "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } } } } } } }, "/webhook/message.didAddReaction": { "get": { "tags": [ "Webhook event" ], "security": [], "summary": "Message Didaddreaction webhook event", "description": "Send updated message whenever add reaction to this message.", "responses": { "200": { "description": "Messages Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "message.didAddReaction" ] }, "data": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ] }, "data": { "type": "object", "description": "Body of a message." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "fileId": { "type": "string", "description": "file key on cloud storage." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } } } } } } } }, "/webhook/message.didClearflag": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Message Didclearflag webhook event", "description": "Send updated message whenever all message flags are cleared.", "responses": { "200": { "description": "messages is messages information. users is list of all user relate to this messages", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "message.didClearflag" ] }, "data": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "description": "Type of a message (text, image, video, json)." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "data": { "type": "object", "description": "Body of a message." }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } }, "required": [ "messageId", "channelId", "userId", "channelSegment", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } } } }, "/webhook/message.didCreate": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Message Didcreate webhook event", "description": "Send new created message whenever a message got created in a channel", "responses": { "200": { "description": "messages is messages information. users is list of all user relate to this messages", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "message.didCreate" ] }, "data": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "description": "Type of a message (text, image, video, json)." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "data": { "type": "object", "description": "Body of a message." }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } }, "required": [ "messageId", "channelId", "userId", "channelSegment", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } } } }, "/webhook/message.didDelete": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Message Diddelete webhook event", "description": "Send deleted message whenever a message got deleted in a channel", "responses": { "200": { "description": "messages is messages information. users is list of all user relate to this messages", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "message.didDelete" ] }, "data": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "description": "Type of a message (text, image, video, json)." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "data": { "type": "object", "description": "Body of a message." }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } }, "required": [ "messageId", "channelId", "userId", "channelSegment", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } } } }, "/webhook/message.didFlag": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Message Didflag webhook event", "description": "Send updated message whenever a message got flag", "responses": { "200": { "description": "messages is messages information. users is list of all user relate to this messages", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "message.didFlag" ] }, "data": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "description": "Type of a message (text, image, video, json)." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "data": { "type": "object", "description": "Body of a message." }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } }, "required": [ "messageId", "channelId", "userId", "channelSegment", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } } } }, "/webhook/message.didRemoveReaction": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Message Didremovereaction webhook event", "description": "Send updated message whenever remove reaction to this message.", "responses": { "200": { "description": "Messages Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "message.didRemoveReaction" ] }, "data": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ] }, "data": { "type": "object", "description": "Body of a message." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "fileId": { "type": "string", "description": "file key on cloud storage." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } } } } } } } }, "/webhook/message.didUnflag": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Message Didunflag webhook event", "description": "Send updated message whenever a message flag is removed.", "responses": { "200": { "description": "messages is messages information. users is list of all user relate to this messages", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "message.didUnflag" ] }, "data": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "description": "Type of a message (text, image, video, json)." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "data": { "type": "object", "description": "Body of a message." }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } }, "required": [ "messageId", "channelId", "userId", "channelSegment", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } } } }, "/webhook/message.didUpdate": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Message Didupdate webhook event", "description": "Send updated message whenever a message got updated in a channel", "responses": { "200": { "description": "messages is messages information. users is list of all user relate to this messages", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "message.didUpdate" ] }, "data": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "description": "Type of a message (text, image, video, json)." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "data": { "type": "object", "description": "Body of a message." }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } }, "required": [ "messageId", "channelId", "userId", "channelSegment", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } } } }, "/webhook/moderation.didBan": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Moderation Didban webhook event", "description": "Send banned event whenever a system detect message that contain in the blacklist", "responses": { "200": { "description": "channel is channel information. userId is a userId who send the message. users is a list of userInfo", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "moderation.didBan" ] }, "data": { "type": "object", "properties": { "channel": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatar": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "userId": { "type": "string" } } } } } } } } } } }, "/webhook/poll.didCreate": { "get": { "tags": [ "Webhook event" ], "summary": "Poll Didcreate webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when poll is created\n", "responses": { "200": { "description": "Poll Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } } } }, "/webhook/poll.didUpdate": { "get": { "tags": [ "Webhook event" ], "summary": "Poll Didupdate webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when poll is updated\n", "responses": { "200": { "description": "Poll Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } } } }, "/webhook/poll.didVote": { "get": { "tags": [ "Webhook event" ], "summary": "Poll Didvote webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when vote is created in poll\n", "responses": { "200": { "description": "Poll Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } } } }, "/webhook/push-notification/channel.created": { "get": { "tags": [ "Webhook event" ], "summary": "Channel Created webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when channel is created/joined\n", "responses": { "200": { "description": "channel created/joined", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Channels Information", "type": "object", "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } ] } } } } } } } } }, "/webhook/push-notification/channel.joined": { "get": { "tags": [ "Webhook event" ], "summary": "Channel Joined webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when channel is created/joined\n", "responses": { "200": { "description": "channel created/joined", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Channels Information", "type": "object", "properties": { "channels": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } ] } } } } } } } } }, "/webhook/push-notification/comment.created": { "get": { "tags": [ "Webhook event" ], "summary": "Comment Created webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is created\n", "responses": { "200": { "description": "comment created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Comment Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } } } } ] } } } } } } } } }, "/webhook/push-notification/comment.reacted": { "get": { "tags": [ "Webhook event" ], "summary": "Comment Reacted webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is created\n", "responses": { "200": { "description": "comment created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Comment Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } } } } ] } } } } } } } } }, "/webhook/push-notification/comment.replied": { "get": { "tags": [ "Webhook event" ], "summary": "Comment Replied webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is created\n", "responses": { "200": { "description": "comment created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Comment Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } } } } ] } } } } } } } } }, "/webhook/push-notification/follow.accepted": { "get": { "tags": [ "Webhook event" ], "summary": "Follow Accepted webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when follow is created/requested/accepted\n", "responses": { "200": { "description": "follow created/requested/accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Follow Response Object", "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } ] } } } } } } } } }, "/webhook/push-notification/follow.created": { "get": { "tags": [ "Webhook event" ], "summary": "Follow Created webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when follow is created/requested/accepted\n", "responses": { "200": { "description": "follow created/requested/accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Follow Response Object", "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } ] } } } } } } } } }, "/webhook/push-notification/follow.requested": { "get": { "tags": [ "Webhook event" ], "summary": "Follow Requested webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when follow is created/requested/accepted\n", "responses": { "200": { "description": "follow created/requested/accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Follow Response Object", "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } ] } } } } } } } } }, "/webhook/push-notification/message.created": { "get": { "tags": [ "Webhook event" ], "summary": "Message Created webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when message is created\n", "responses": { "200": { "description": "message created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Messages Information", "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "enum": [ "text", "image", "file", "custom", "video", "audio", "imagemap" ] }, "data": { "type": "object", "description": "Body of a message." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "fileId": { "type": "string", "description": "file key on cloud storage." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } ] } } } } } } } } }, "/webhook/push-notification/post.approved": { "get": { "tags": [ "Webhook event" ], "summary": "Post Approved webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is created\n", "responses": { "200": { "description": "post created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Post Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } } } } ] } } } } } } } } }, "/webhook/push-notification/post.created": { "get": { "tags": [ "Webhook event" ], "summary": "Post Created webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is created\n", "responses": { "200": { "description": "post created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Post Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } } } } ] } } } } } } } } }, "/webhook/push-notification/post.need-reviewing": { "get": { "tags": [ "Webhook event" ], "summary": "Post Need Reviewing webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is created\n", "responses": { "200": { "description": "post created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Post Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } } } } ] } } } } } } } } }, "/webhook/push-notification/post.reacted": { "get": { "tags": [ "Webhook event" ], "summary": "Post Reacted webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is created\n", "responses": { "200": { "description": "post created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Post Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } } } } ] } } } } } } } } }, "/webhook/push-notification/video-streaming.started": { "get": { "tags": [ "Webhook event" ], "summary": "Video Streaming Started webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when video-streaming is started\n", "responses": { "200": { "description": "video-streaming is started", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": true }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "video streaming information", "type": "object", "properties": { "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } ] } } } } } } } } }, "/webhook/push-notification/mention-comment.created": { "get": { "tags": [ "Webhook event" ], "summary": "Mention Comment Created webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is created\n", "responses": { "200": { "description": "comment created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Comment Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } } } } ] } } } } } } } } }, "/webhook/push-notification/mention-comment.replied": { "get": { "tags": [ "Webhook event" ], "summary": "Mention Comment Replied webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is created\n", "responses": { "200": { "description": "comment created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Comment Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } } } } ] } } } } } } } } }, "/webhook/push-notification/mention-post.created": { "get": { "tags": [ "Webhook event" ], "summary": "Mention Post Created webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is created\n", "responses": { "200": { "description": "post created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Post Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } } } } ] } } } } } } } } }, "/webhook/push-notification/mention-user-feed-comment.created": { "get": { "tags": [ "Webhook event" ], "summary": "Mention User Feed Comment Created webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is created\n", "responses": { "200": { "description": "comment created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Comment Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } } } } ] } } } } } } } } }, "/webhook/push-notification/mention-user-feed-comment.replied": { "get": { "tags": [ "Webhook event" ], "summary": "Mention User Feed Comment Replied webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is created\n", "responses": { "200": { "description": "comment created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Comment Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } } } } ] } } } } } } } } }, "/webhook/push-notification/mention-user-feed-post.created": { "get": { "tags": [ "Webhook event" ], "summary": "Mention User Feed Post Created webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is created\n", "responses": { "200": { "description": "post created", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventType": { "type": "string", "enum": [ "push-notification.created" ] }, "id": { "type": "string" }, "networkId": { "type": "string" }, "path": { "type": "string" }, "senderId": { "type": "string" }, "sentTime": { "type": "string", "format": "date-time" }, "version": { "type": "string" }, "data": { "type": "object", "properties": { "eventName": { "type": "string" }, "isBroadcast": { "type": "boolean", "default": false }, "targetIds": { "type": "array", "items": { "type": "string" } }, "notify": { "type": "boolean", "description": "should notify to user targetIds" }, "title": { "type": "string" }, "body": { "type": "string" } }, "allOf": [ { "description": "Post Information", "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } } } } ] } } } } } } } } }, "/webhook/user.didClearFlag": { "get": { "tags": [ "Webhook event" ], "summary": "User Didclearflag webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when the user flags are cleared\n", "responses": { "200": { "description": "User flag cleared event information. users is a list of userInfo. files is a list of file information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } } } } }, "/webhook/user.didCreate": { "get": { "tags": [ "Webhook event" ], "summary": "User Didcreate webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a user is created\n", "responses": { "200": { "description": "User created event information. users is a list of userInfo. files is a list of file information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } } } } }, "/webhook/user.didFlag": { "get": { "tags": [ "Webhook event" ], "summary": "User Didflag webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a user is flagged\n", "responses": { "200": { "description": "User flag event information. users is a list of userInfo. files is a list of file information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } } } } }, "/webhook/user.didUnflag": { "get": { "tags": [ "Webhook event" ], "summary": "User Didunflag webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a user is unflagged\n", "responses": { "200": { "description": "User unflag event information. users is a list of userInfo. files is a list of file information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } } } } }, "/webhook/user.didUpdate": { "get": { "tags": [ "Webhook event" ], "summary": "User Didupdate webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a user is updated\n", "responses": { "200": { "description": "User updated event information. users is a list of userInfo. files is a list of file information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } } } } }, "/webhook/v3.comment.didAddReaction": { "get": { "tags": [ "Webhook event" ], "summary": "Comment Didaddreaction webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when reaction of comment is added.\n", "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } } } } } } } }, "/webhook/v3.comment.didCreate": { "get": { "tags": [ "Webhook event" ], "summary": "Comment Didcreate webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is created\n", "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } } } } }, "/webhook/v3.comment.didDelete": { "get": { "tags": [ "Webhook event" ], "summary": "Comment Diddelete webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is deleted\n", "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } } } } }, "/webhook/v3.comment.didFlag": { "get": { "tags": [ "Webhook event" ], "summary": "Comment Didflag webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is flagged.\n", "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "flaggedUserId": { "type": "string" } } } } } } } } } } }, "/webhook/v3.comment.didRemoveReaction": { "get": { "tags": [ "Webhook event" ], "summary": "Comment Didremovereaction webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when reaction of comment is removed.\n", "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } } } } } } } }, "/webhook/v3.comment.didReply": { "get": { "tags": [ "Webhook event" ], "summary": "Comment Didreply webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is replied.\n", "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } } } } }, "/webhook/v3.comment.didUnflag": { "get": { "tags": [ "Webhook event" ], "summary": "Comment Didunflag webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is unflagged.\n", "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "flaggedUserId": { "type": "string" } } } } } } } } } } }, "/webhook/v3.comment.didUpdate": { "get": { "tags": [ "Webhook event" ], "summary": "Comment Didupdate webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is updated\n", "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } } } } }, "/webhook/v3.comment.didModerate": { "get": { "tags": [ "Webhook event" ], "summary": "Comment Didmoderate webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when comment is moderated\n", "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } } } } }, "/webhook/v3.community.didAddUsers": { "get": { "tags": [ "Webhook event" ], "summary": "Community Didaddusers webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when add users into community\n", "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } } } } } } }, "/webhook/v3.community.didBan": { "get": { "tags": [ "Webhook event" ], "summary": "Community Didban webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when community user is banned\n", "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } } } } } } }, "/webhook/v3.community.didCreate": { "get": { "tags": [ "Webhook event" ], "summary": "Community Didcreate webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when community is created\n", "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } } } } } } }, "/webhook/v3.community.didDelete": { "get": { "tags": [ "Webhook event" ], "summary": "Community Diddelete webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when community is deleted\n", "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } } } } } } }, "/webhook/v3.community.didJoin": { "get": { "tags": [ "Webhook event" ], "summary": "Community Didjoin webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when user joined a community.\n", "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } } } } } } }, "/webhook/v3.community.didLeave": { "get": { "tags": [ "Webhook event" ], "summary": "Community Didleave webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when user left a community\n", "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } } } } } } }, "/webhook/v3.community.didRemoveUsers": { "get": { "tags": [ "Webhook event" ], "summary": "Community Didremoveusers webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when remove users from community\n", "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } } } } } } }, "/webhook/v3.community.didRoleChange": { "get": { "tags": [ "Webhook event" ], "summary": "Community Didrolechange webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when role of user is changed in community\n", "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } } } } } } }, "/webhook/v3.community.didUnban": { "get": { "tags": [ "Webhook event" ], "summary": "Community Didunban webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when community user is unbanned\n", "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } } } } } } }, "/webhook/v3.community.didUpdate": { "get": { "tags": [ "Webhook event" ], "summary": "Community Didupdate webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when community is updated\n", "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } } } } } } } }, "/webhook/v3.communityJoinRequest.didCreate": { "get": { "tags": [ "Webhook event" ], "summary": "Community Join Request Did Create webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a community join request is created\n", "responses": { "200": { "description": "Join Community Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "joinRequests": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a join request." }, "networkId": { "type": "string", "description": "ID of the network." }, "targetId": { "type": "string", "description": "ID of the target entity (community)." }, "targetType": { "type": "string", "description": "Type of the target entity." }, "type": { "type": "string", "description": "Type of the request." }, "userId": { "type": "string", "description": "ID of the user making the request." }, "status": { "type": "string", "description": "Current status of the join request." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "The date/time when the request was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was created." }, "joinRequestId": { "type": "string", "description": "Public ID of the join request." }, "requestorId": { "type": "string", "description": "Public ID of the user who made the request." }, "requestorPublicId": { "type": "string", "description": "Public ID of the requestor." }, "requestorInternalId": { "type": "string", "description": "Internal ID of the requestor." }, "responderId": { "type": "string", "nullable": true, "description": "ID of the user who responded to the request." }, "responderPublicId": { "type": "string", "nullable": true, "description": "Public ID of the responder." }, "responderInternalId": { "type": "string", "nullable": true, "description": "Internal ID of the responder." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } } } } }, "/webhook/v3.communityJoinRequest.didAccept": { "get": { "tags": [ "Webhook event" ], "summary": "Community Join Request Did Accept webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a community join request is accepted\n", "responses": { "200": { "description": "Join Community Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "joinRequests": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a join request." }, "networkId": { "type": "string", "description": "ID of the network." }, "targetId": { "type": "string", "description": "ID of the target entity (community)." }, "targetType": { "type": "string", "description": "Type of the target entity." }, "type": { "type": "string", "description": "Type of the request." }, "userId": { "type": "string", "description": "ID of the user making the request." }, "status": { "type": "string", "description": "Current status of the join request." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "The date/time when the request was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was created." }, "joinRequestId": { "type": "string", "description": "Public ID of the join request." }, "requestorId": { "type": "string", "description": "Public ID of the user who made the request." }, "requestorPublicId": { "type": "string", "description": "Public ID of the requestor." }, "requestorInternalId": { "type": "string", "description": "Internal ID of the requestor." }, "responderId": { "type": "string", "nullable": true, "description": "ID of the user who responded to the request." }, "responderPublicId": { "type": "string", "nullable": true, "description": "Public ID of the responder." }, "responderInternalId": { "type": "string", "nullable": true, "description": "Internal ID of the responder." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } } } } }, "/webhook/v3.communityJoinRequest.didReject": { "get": { "tags": [ "Webhook event" ], "summary": "Community Join Request Did Reject webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a community join request is rejected\n", "responses": { "200": { "description": "Join Community Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "joinRequests": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a join request." }, "networkId": { "type": "string", "description": "ID of the network." }, "targetId": { "type": "string", "description": "ID of the target entity (community)." }, "targetType": { "type": "string", "description": "Type of the target entity." }, "type": { "type": "string", "description": "Type of the request." }, "userId": { "type": "string", "description": "ID of the user making the request." }, "status": { "type": "string", "description": "Current status of the join request." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "The date/time when the request was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date/time when the join request was created." }, "joinRequestId": { "type": "string", "description": "Public ID of the join request." }, "requestorId": { "type": "string", "description": "Public ID of the user who made the request." }, "requestorPublicId": { "type": "string", "description": "Public ID of the requestor." }, "requestorInternalId": { "type": "string", "description": "Internal ID of the requestor." }, "responderId": { "type": "string", "nullable": true, "description": "ID of the user who responded to the request." }, "responderPublicId": { "type": "string", "nullable": true, "description": "Public ID of the responder." }, "responderInternalId": { "type": "string", "nullable": true, "description": "Internal ID of the responder." } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "roleId": { "type": "string" }, "displayName": { "type": "string" }, "updatedAt": { "type": "string", "description": "The date/time when a role is updated or deleted.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a role is created.", "format": "date-time" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions" }, "isDeleted": { "type": "boolean", "default": false } }, "required": [ "roleId", "permissions", "updatedAt", "isDeleted" ] } } } } } } } } } }, "/webhook/v3.communityMemberInvitation.didCreate": { "get": { "tags": [ "Webhook event" ], "summary": "Community Member Invitation Did Create webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a community member invitation is created\n", "responses": { "200": { "description": "Create invitation response", "content": { "application/json": { "schema": { "type": "object", "properties": { "invitations": { "type": "array", "description": "Array of created invitation objects", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of the invitation." }, "networkId": { "type": "string", "description": "ID of the network." }, "type": { "type": "string", "description": "Type of invitation.", "enum": [ "communityMemberInvite" ] }, "targetId": { "type": "string", "description": "ID of the target entity (community, group, etc.)." }, "targetType": { "type": "string", "description": "Type of target entity.", "enum": [ "community" ] }, "userId": { "type": "string", "description": "ID of the user who received the invitation." }, "status": { "type": "string", "description": "Current status of the invitation.", "enum": [ "pending", "approved", "rejected", "cancelled" ] }, "createdBy": { "type": "string", "description": "ID of the user who created the invitation." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "When the invitation was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the invitation was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "When the invitation was created." }, "invitationId": { "type": "string", "description": "Public ID of the invitation." }, "invitedUserId": { "type": "string", "description": "User ID of the invited user." }, "invitedUserPublicId": { "type": "string", "description": "Public ID of the invited user." }, "invitedUserInternalId": { "type": "string", "description": "Internal ID of the invited user." }, "inviterUserId": { "type": "string", "description": "User ID of the inviter." }, "inviterUserPublicId": { "type": "string", "description": "Public ID of the inviter." }, "inviterUserInternalId": { "type": "string", "description": "Internal ID of the inviter." }, "communityId": { "type": "string", "description": "ID of the community (for community invitations).", "nullable": true } }, "required": [ "_id", "networkId", "type", "targetId", "targetType", "userId", "status", "createdBy", "createdAt", "updatedAt", "invitationId", "invitedUserId", "invitedUserPublicId", "invitedUserInternalId", "inviterUserId", "inviterUserPublicId", "inviterUserInternalId" ] } }, "users": { "type": "array", "description": "User details for invited users", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } }, "/webhook/v3.communityMemberInvitation.didAccept": { "get": { "tags": [ "Webhook event" ], "summary": "Community Member Invitation Did Accept webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a community member invitation is accepted\n", "responses": { "200": { "description": "Create invitation response", "content": { "application/json": { "schema": { "type": "object", "properties": { "invitations": { "type": "array", "description": "Array of created invitation objects", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of the invitation." }, "networkId": { "type": "string", "description": "ID of the network." }, "type": { "type": "string", "description": "Type of invitation.", "enum": [ "communityMemberInvite" ] }, "targetId": { "type": "string", "description": "ID of the target entity (community, group, etc.)." }, "targetType": { "type": "string", "description": "Type of target entity.", "enum": [ "community" ] }, "userId": { "type": "string", "description": "ID of the user who received the invitation." }, "status": { "type": "string", "description": "Current status of the invitation.", "enum": [ "pending", "approved", "rejected", "cancelled" ] }, "createdBy": { "type": "string", "description": "ID of the user who created the invitation." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "When the invitation was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the invitation was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "When the invitation was created." }, "invitationId": { "type": "string", "description": "Public ID of the invitation." }, "invitedUserId": { "type": "string", "description": "User ID of the invited user." }, "invitedUserPublicId": { "type": "string", "description": "Public ID of the invited user." }, "invitedUserInternalId": { "type": "string", "description": "Internal ID of the invited user." }, "inviterUserId": { "type": "string", "description": "User ID of the inviter." }, "inviterUserPublicId": { "type": "string", "description": "Public ID of the inviter." }, "inviterUserInternalId": { "type": "string", "description": "Internal ID of the inviter." }, "communityId": { "type": "string", "description": "ID of the community (for community invitations).", "nullable": true } }, "required": [ "_id", "networkId", "type", "targetId", "targetType", "userId", "status", "createdBy", "createdAt", "updatedAt", "invitationId", "invitedUserId", "invitedUserPublicId", "invitedUserInternalId", "inviterUserId", "inviterUserPublicId", "inviterUserInternalId" ] } }, "users": { "type": "array", "description": "User details for invited users", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } }, "/webhook/v3.communityMemberInvitation.didReject": { "get": { "tags": [ "Webhook event" ], "summary": "Community Member Invitation Did Reject webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when a community member invitation is rejected\n", "responses": { "200": { "description": "Create invitation response", "content": { "application/json": { "schema": { "type": "object", "properties": { "invitations": { "type": "array", "description": "Array of created invitation objects", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of the invitation." }, "networkId": { "type": "string", "description": "ID of the network." }, "type": { "type": "string", "description": "Type of invitation.", "enum": [ "communityMemberInvite" ] }, "targetId": { "type": "string", "description": "ID of the target entity (community, group, etc.)." }, "targetType": { "type": "string", "description": "Type of target entity.", "enum": [ "community" ] }, "userId": { "type": "string", "description": "ID of the user who received the invitation." }, "status": { "type": "string", "description": "Current status of the invitation.", "enum": [ "pending", "approved", "rejected", "cancelled" ] }, "createdBy": { "type": "string", "description": "ID of the user who created the invitation." }, "respondedAt": { "type": "string", "nullable": true, "format": "date-time", "description": "When the invitation was responded to (approved/rejected)." }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the invitation was last updated." }, "createdAt": { "type": "string", "format": "date-time", "description": "When the invitation was created." }, "invitationId": { "type": "string", "description": "Public ID of the invitation." }, "invitedUserId": { "type": "string", "description": "User ID of the invited user." }, "invitedUserPublicId": { "type": "string", "description": "Public ID of the invited user." }, "invitedUserInternalId": { "type": "string", "description": "Internal ID of the invited user." }, "inviterUserId": { "type": "string", "description": "User ID of the inviter." }, "inviterUserPublicId": { "type": "string", "description": "Public ID of the inviter." }, "inviterUserInternalId": { "type": "string", "description": "Internal ID of the inviter." }, "communityId": { "type": "string", "description": "ID of the community (for community invitations).", "nullable": true } }, "required": [ "_id", "networkId", "type", "targetId", "targetType", "userId", "status", "createdBy", "createdAt", "updatedAt", "invitationId", "invitedUserId", "invitedUserPublicId", "invitedUserInternalId", "inviterUserId", "inviterUserPublicId", "inviterUserInternalId" ] } }, "users": { "type": "array", "description": "User details for invited users", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } }, "/webhook/v3.post.didAddReaction": { "get": { "tags": [ "Webhook event" ], "summary": "Post Didaddreaction webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when reaction of post is added.\n", "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } } } } } } } } } } } }, "/webhook/v3.post.didApprove": { "get": { "tags": [ "Webhook event" ], "summary": "Post Didapprove webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is approved\n", "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } } } } } } } } } } } }, "/webhook/v3.post.didCreate": { "get": { "tags": [ "Webhook event" ], "summary": "Post Didcreate webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is created\n", "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } } } } } } } } } } } }, "/webhook/v3.post.didDecline": { "get": { "tags": [ "Webhook event" ], "summary": "Post Diddecline webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is declined\n", "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } } } } } } } } } } } }, "/webhook/v3.post.didDelete": { "get": { "tags": [ "Webhook event" ], "summary": "Post Diddelete webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is deleted\n", "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } } } } } } } } } } } }, "/webhook/v3.post.didFlag": { "get": { "tags": [ "Webhook event" ], "summary": "Post Didflag webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is flagged.\n", "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "flaggedUserId": { "type": "string" } } } } } } } } } } }, "/webhook/v3.post.didRemoveReaction": { "get": { "tags": [ "Webhook event" ], "summary": "Post Didremovereaction webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when reaction of post is removed.\n", "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } } } } } } } } } } } }, "/webhook/v3.post.didUnflag": { "get": { "tags": [ "Webhook event" ], "summary": "Post Didunflag webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is unflagged.\n", "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "flaggedUserId": { "type": "string" } } } } } } } } } } }, "/webhook/v3.post.didUpdate": { "get": { "tags": [ "Webhook event" ], "summary": "Post Didupdate webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is updated\n", "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } } } } } } } } } } } }, "/webhook/v3.post.didModerate": { "get": { "tags": [ "Webhook event" ], "summary": "Post Didmoderate webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when post is moderated\n", "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "title": { "type": "string", "description": "Title of a post.", "maxLength": 150 }, "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "childrenNumber": { "type": "integer", "description": "The number of all children posts for this post." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "technology" }, "example": [ "technology", "programming", "web_development", "JavaScript", "AI_trends" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" }, "structureType": { "type": "string", "description": "Structure type of the post", "enum": [ "file", "image", "video", "audio", "text", "liveStream", "poll", "clip", "room", "mixed" ], "example": "text" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } }, "roomChildrens": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } } } } } } } } } } } } }, "/webhook/video-streaming.didRecord": { "get": { "tags": [ "Webhook event" ], "summary": "Video Streaming Didrecord webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when video streaming recordings is ready.\n", "responses": { "200": { "description": "video streaming information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } } } } }, "/webhook/video-streaming.didStart": { "get": { "tags": [ "Webhook event" ], "summary": "Video Streaming Didstart webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when video streaming start.\n", "responses": { "200": { "description": "video streaming information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } } } } }, "/webhook/video-streaming.didStop": { "get": { "tags": [ "Webhook event" ], "summary": "Video Streaming Didstop webhook event", "security": [ { "BearerAuth": [] } ], "description": "This is called when video streaming stop.\n", "responses": { "200": { "description": "video streaming information", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string" }, "data": { "type": "object", "properties": { "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "videoStreamingChildren": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } } } } } } } }, "/webhook/v5.message.didCreate": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Message Didcreate webhook event", "description": "Send created message whenever a message got created in a channel", "responses": { "200": { "description": "messages is messages information. users is list of all user relate to this messages", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "message.didCreate" ] }, "data": { "type": "object", "properties": { "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "messageFeeds": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "description": "Type of a message (text, image, video, json)." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "data": { "type": "object", "description": "Body of a message." }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } }, "required": [ "messageId", "channelId", "userId", "channelSegment", "createdAt", "updatedAt" ] } }, "messages": { "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "reactions": { "type": "array", "items": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactors": { "type": "array", "description": "List of mapping between reaction and reactor ID.", "items": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } }, "required": [ "referenceId", "referenceType" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } } } }, "/webhook/v5.message.didDelete": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Message Diddelete webhook event", "description": "Send deleted message whenever a message got deleted in a channel", "responses": { "200": { "description": "messages is messages information. users is list of all user relate to this messages", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "message.didDelete" ] }, "data": { "type": "object", "properties": { "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "messageFeeds": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "description": "Type of a message (text, image, video, json)." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "data": { "type": "object", "description": "Body of a message." }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } }, "required": [ "messageId", "channelId", "userId", "channelSegment", "createdAt", "updatedAt" ] } }, "messages": { "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "reactions": { "type": "array", "items": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactors": { "type": "array", "description": "List of mapping between reaction and reactor ID.", "items": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } }, "required": [ "referenceId", "referenceType" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } } } }, "/webhook/v5.message.didUpdate": { "get": { "security": [], "tags": [ "Webhook event" ], "summary": "Message Didupdate webhook event", "description": "Send updated message whenever a message got updated in a channel", "responses": { "200": { "description": "messages is messages information. users is list of all user relate to this messages", "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "message.didCreate" ] }, "data": { "type": "object", "properties": { "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "messageFeeds": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "messageId": { "type": "string", "description": "ID of a message." }, "parentId": { "type": "string", "description": "ID of a parent message." }, "childrenNumber": { "type": "integer", "description": "A number of comments in this message." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a user." }, "type": { "type": "string", "description": "Type of a message (text, image, video, json)." }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "data": { "type": "object", "description": "Body of a message." }, "isDeleted": { "type": "boolean", "description": "A flag to hide a message. Unable to show after hiding. It will be set to true when user deletes a message or a channel of this message is banned." }, "channelSegment": { "type": "integer", "description": "A sequence number of a message in channel." }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel of this message is banned or this message is deleted.", "format": "date-time" }, "editedAt": { "type": "string", "description": "The date/time when a message is deleted or updated.", "format": "date-time" }, "flagCount": { "type": "integer", "description": "The number of users that has read this message." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this message is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter." }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this messages." }, "myReactions": { "type": "array", "description": "The list of my reactions to this message. This property will not exist when it is triggered from an event 'message.didUpdate'.", "items": { "type": "string" } }, "latestReaction": { "type": "object", "description": "The latest reaction. This property will exist when it is triggered from an event 'message.didUpdate'.", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactionName": { "type": "string" }, "userId": { "type": "string" }, "userDisplayName": { "type": "string" }, "reactionId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" } } }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification for the message.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user * `channel` - notification mentions all user in channel\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId. if the mention type is a channel, doesn't send userIds", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } } }, "required": [ "messageId", "channelId", "userId", "channelSegment", "createdAt", "updatedAt" ] } }, "messages": { "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "reactions": { "type": "array", "items": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "ID of a document." }, "referenceType": { "type": "string", "description": "Type of document." }, "reactors": { "type": "array", "description": "List of mapping between reaction and reactor ID.", "items": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } }, "required": [ "referenceId", "referenceType" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } } } } } } } }, "/realtime/channel.banned": { "get": { "security": [], "summary": "user is banned from the channel", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Channel Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "channels": { "description": "The list of channels", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "The list of channel users", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "users": { "description": "The list of users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of files", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/channel.created": { "get": { "security": [], "summary": "channel created", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Channel Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "channels": { "description": "The list of channels", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "The list of channel users", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "users": { "description": "The list of users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of files", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/channel.deleted": { "get": { "security": [], "summary": "channel deleted", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Channel Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "channels": { "description": "The list of channels", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "The list of channel users", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "users": { "description": "The list of users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of files", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/channel.joined": { "get": { "security": [], "summary": "user joined the channel", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Channel Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "channels": { "description": "The list of channels", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "The list of channel users", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "users": { "description": "The list of users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of files", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/channel.left": { "get": { "security": [], "summary": "user left the channel", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Channel Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "channels": { "description": "The list of channels", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "The list of channel users", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "users": { "description": "The list of users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of files", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/channel.membersAdded": { "get": { "security": [], "summary": "users were added to the channel", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Channel Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "channels": { "description": "The list of channels", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "The list of channel users", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "users": { "description": "The list of users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of files", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/channel.membersRemoved": { "get": { "security": [], "summary": "users were removed from the channel", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Channel Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "channels": { "description": "The list of channels", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "The list of channel users", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "users": { "description": "The list of users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of files", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/channel.unbanned": { "get": { "security": [], "summary": "user is unbanned from the channel", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Channel Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "channels": { "description": "The list of channels", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "The list of channel users", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "users": { "description": "The list of users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of files", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/channel.updated": { "get": { "security": [], "summary": "channel updated", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Channel Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "channels": { "description": "The list of channels", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "The list of channel users", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "users": { "description": "The list of users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of files", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/channel.setMuted": { "get": { "security": [], "summary": "channel setMuted", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Channel Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "channelId": { "type": "string" }, "muteTimeout": { "type": "string" }, "actor": { "type": "string" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/channel.setMutedUsers": { "get": { "security": [], "summary": "channel setMutedUsers", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Channel Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "channelId": { "type": "string" }, "userIds": { "type": "array", "items": { "type": "string" } }, "muteTimeout": { "type": "string" }, "actor": { "type": "string" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/comment.addReaction": { "get": { "security": [], "summary": "comment add reaction", "description": "Event has occurred when a reaction is added to comment\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The comment ID." }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } } ] } } } } } } }, "/realtime/comment.created": { "get": { "security": [], "summary": "comment created", "description": "Event has occurred when comment was created\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The comment ID." }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/comment.deleted": { "get": { "security": [], "summary": "comment deleted", "description": "Event has occurred when comment was deleted\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The comment ID." }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/comment.flagged": { "get": { "security": [], "summary": "comment flagged", "description": "Event has occurred when comment was flagged\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The comment ID." }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "flaggedUserId": { "type": "string", "description": "ID of the User has been flagged" } } } } } ] } } } } } } }, "/realtime/comment.flagsCleared": { "get": { "security": [], "summary": "comment flag cleared", "description": "Event has occurred when comment flag was cleared\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The comment ID." }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "flaggedUserId": { "type": "string", "description": "ID of the User has been flagged" } } } } } ] } } } } } } }, "/realtime/comment.removeReaction": { "get": { "security": [], "summary": "comment remove reaction", "description": "Event has occurred when a reaction is removed from comment\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The comment ID." }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } } ] } } } } } } }, "/realtime/comment.unflagged": { "get": { "security": [], "summary": "comment unflagged", "description": "Event has occurred when comment was unflagged\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The comment ID." }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "flaggedUserId": { "type": "string", "description": "ID of the User has been flagged" } } } } } ] } } } } } } }, "/realtime/comment.updated": { "get": { "security": [], "summary": "comment updated", "description": "Event has occurred when comment was updated\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Comment Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The comment ID." }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/community.created": { "get": { "security": [], "summary": "community created", "description": "Event has occurred when community was created\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The community ID." }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/community.deleted": { "get": { "security": [], "summary": "community deleted", "description": "Event has occurred when community was deleted\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The community ID." }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/community.joined": { "get": { "security": [], "summary": "community joined", "description": "Event has occurred when joined community\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The community ID." }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/community.left": { "get": { "security": [], "summary": "community left", "description": "Event has occurred when left community\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The community ID." }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/community.updated": { "get": { "security": [], "summary": "community updated", "description": "Event has occurred when community was updated\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The community ID." }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/community.userAdded": { "get": { "security": [], "summary": "community user added", "description": "Event has occurred when user was added to community\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The community ID." }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/community.userBanned": { "get": { "security": [], "summary": "community user banned", "description": "Event has occurred when user was banned from community\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The community ID." }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/community.userChanged": { "get": { "security": [], "summary": "community user changed", "description": "Event has occurred when the number of user was changed in community\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The community ID." }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/community.userRemoved": { "get": { "security": [], "summary": "community user removed", "description": "Event has occurred when user was removed from community\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The community ID." }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/community.userUnbanned": { "get": { "security": [], "summary": "community user unbanned", "description": "Event has occurred when user was unbanned from community\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Community Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The community ID." }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/follow.accepted": { "get": { "security": [], "summary": "follow accepted", "description": "Event has occurred when follow was accepted\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/follow.created": { "get": { "security": [], "summary": "follow created", "description": "Event has occurred when follow was created\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/follow.followerDeleted": { "get": { "security": [], "summary": "delete follower", "description": "Event has occurred when follower was deleted\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/follow.requestCanceled": { "get": { "security": [], "summary": "follow request canceled", "description": "Event has occurred when follow request was canceled\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/follow.requestDeclined": { "get": { "security": [], "summary": "decline follow request", "description": "Event has occurred when follow request was declined\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/follow.requested": { "get": { "security": [], "summary": "follow requested", "description": "Event has occurred when follow was requested\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/follow.unfollowed": { "get": { "security": [], "summary": "unfollowed", "description": "Event has occurred when unfollow was created\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/liveReaction.created": { "get": { "security": [], "summary": "live reactions created", "description": "Event has occurred when reactions were added to a live streaming post\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "type": "object", "properties": { "reactions": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "The public ID of the user who reacted" }, "referenceId": { "type": "string", "description": "The internal ID of the post" }, "referencePublicId": { "type": "string", "description": "The public ID of the post" }, "referenceType": { "type": "string", "description": "The type of the post (e.g., 'post', 'comment')" }, "targetId": { "type": "string", "description": "The public ID of the target (community, user, etc.)" }, "targetType": { "type": "string", "description": "The type of the target (e.g., 'community', 'user')" }, "reactionName": { "type": "string", "description": "The name of the reaction (e.g., 'like', 'love')" }, "occurredAt": { "type": "string", "format": "date-time", "description": "The timestamp when the reaction occurred" } } } } } } } } } } } }, "/realtime/marker.marked-message": { "get": { "security": [], "summary": "marked message in marker", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Marked message response", "content": { "application/json": { "schema": { "properties": { "contentMarkers": { "type": "array", "items": { "type": "object", "properties": { "contentId": { "type": "string", "description": "message id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "segment": { "type": "number", "description": "segment of message" }, "creatorId": { "type": "string", "description": "user id (internal) of creator" }, "readCount": { "type": "number", "description": "count of read users" }, "deliveredCount": { "type": "number", "description": "count of delivered users" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } } } } }, "/realtime/marker.marker.user-sync": { "get": { "security": [], "summary": "user sync in marker", "tags": [ "Realtime event" ], "responses": { "200": { "description": "User sync response", "content": { "application/json": { "schema": { "properties": { "userMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "lastSyncAt": { "type": "string", "description": "The date/time when user last sync.", "format": "date-time" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isMentioned": { "type": "boolean" }, "createdAt": { "type": "string", "description": "The date/time when user markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user markers are updated.", "format": "date-time" } } } }, "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "userEntityMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "isDeleted": { "type": "boolean", "description": "flag to check if channel marker deleted" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "membership": { "type": "string", "description": "membership status of user in channel", "enum": [ "member", "banned", "muted", "non-member", "deleted" ] }, "createdAt": { "type": "string", "description": "The date/time when user channel markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user channel markers are updated.", "format": "date-time" } } } } } } } } } } } }, "/realtime/marker.userFeed-updated": { "get": { "security": [], "summary": "user feed updated in marker", "tags": [ "Realtime event" ], "responses": { "200": { "description": "User feed updated response", "content": { "application/json": { "schema": { "properties": { "userFeedMarkers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "User id (internal)" }, "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "readToSegment": { "type": "number", "description": "segment of message as read by user" }, "deliveredToSegment": { "type": "number", "description": "segment of message as delivered by user" }, "unreadCount": { "type": "number", "description": "Unread count of user" }, "lastMentionSegment": { "type": "number", "description": "segment of message as last mentioned by user" }, "isMentioned": { "type": "boolean", "description": "flag to check if user is mentioned in channel" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } }, "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } } } } }, "/realtime/marker.feed-updated": { "get": { "security": [], "summary": "feed updated in marker", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Feed updated response", "content": { "application/json": { "schema": { "properties": { "feedMarkers": { "type": "array", "items": { "type": "object", "properties": { "entityId": { "type": "string", "description": "channel id (internal)" }, "feedId": { "type": "string", "description": "message feed id (internal)" }, "lastSegment": { "type": "number", "description": "segment of message as lasted in message feed" }, "isDeleted": { "type": "boolean", "description": "flag to check if message feed marker deleted" }, "createdAt": { "type": "string", "description": "The date/time when user message feed markers are created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when user message feed markers are updated.", "format": "date-time" } } } } } } } } } } } }, "/realtime/message-feed.created": { "get": { "security": [], "summary": "message feed created", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Feed Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message feed ID." }, "data": { "type": "object", "properties": { "messageFeeds": { "description": "the list of message feed", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/message-feed.deleted": { "get": { "security": [], "summary": "message feed deleted", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Feed Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message feed ID." }, "data": { "type": "object", "properties": { "messageFeeds": { "description": "the list of message feed", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/message-feed.updated": { "get": { "security": [], "summary": "message feed updated", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Feed Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message feed ID." }, "data": { "type": "object", "properties": { "messageFeeds": { "description": "the list of message feed", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/message.addReaction": { "get": { "security": [], "summary": "message reaction added", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message with reaction Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "allOf": [ { "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } }, { "type": "object", "properties": { "reactions": { "description": "The reaction added/removed to the message", "type": "array", "items": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } ] } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/message.created": { "get": { "security": [], "summary": "message created", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "referenceId": { "description": "A reference ID", "type": "string", "maxLength": 30, "example": "1530b11ec8df87da22b06b27" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/message.deleted": { "get": { "security": [], "summary": "message deleted", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/message.flagCleared": { "get": { "security": [], "summary": "message flag cleared", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/message.flagged": { "get": { "security": [], "summary": "message flagged", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/message.reactionAdded": { "get": { "security": [], "summary": "message reaction added", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message with reaction Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "allOf": [ { "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } }, { "type": "object", "properties": { "reactions": { "description": "The reaction added/removed to the message", "type": "array", "items": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } ] } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/message.reactionRemoved": { "get": { "security": [], "summary": "message reaction removed", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message with reaction Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "allOf": [ { "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } }, { "type": "object", "properties": { "reactions": { "description": "The reaction added/removed to the message", "type": "array", "items": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } ] } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/message.unflagged": { "get": { "security": [], "summary": "message unflagged", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/message.updated": { "get": { "security": [], "summary": "message updated", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Message Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/post.addReaction": { "get": { "security": [], "summary": "post add reaction", "description": "Event has occurred when a reaction is added to post\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The post ID." }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } } ] } } } } } } }, "/realtime/post.approved": { "get": { "security": [], "summary": "post approved", "description": "Event has occurred when post was approved\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The post ID." }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "flaggedUserId": { "type": "string", "description": "ID of the User has been flagged" } } } } } ] } } } } } } }, "/realtime/post.created": { "get": { "security": [], "summary": "post created", "description": "Event has occurred when post was created\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The post ID." }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/post.declined": { "get": { "security": [], "summary": "post declined", "description": "Event has occurred when post was declined\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The post ID." }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "flaggedUserId": { "type": "string", "description": "ID of the User has been flagged" } } } } } ] } } } } } } }, "/realtime/post.deleted": { "get": { "security": [], "summary": "post deleted", "description": "Event has occurred post was deleted\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The post ID." }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/post.flagged": { "get": { "security": [], "summary": "post flagged", "description": "Event has occurred when post was flagged\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The post ID." }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "flaggedUserId": { "type": "string", "description": "ID of the User has been flagged" } } } } } ] } } } } } } }, "/realtime/post.flagsCleared": { "get": { "security": [], "summary": "post flag cleared", "description": "Event has occurred when post flag was cleared\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The post ID." }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "flaggedUserId": { "type": "string", "description": "ID of the User has been flagged" } } } } } ] } } } } } } }, "/realtime/post.removeReaction": { "get": { "security": [], "summary": "post remove reaction", "description": "Event has occurred when a reaction is removed from post\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The post ID." }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } } ] } } } } } } }, "/realtime/post.unflagged": { "get": { "security": [], "summary": "post unflagged", "description": "Event has occurred when post was unflagged\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The post ID." }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "flaggedUserId": { "type": "string", "description": "ID of the User has been flagged" } } } } } ] } } } } } } }, "/realtime/post.updated": { "get": { "security": [], "summary": "post updated", "description": "Event has occurred when post was updated\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Post Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The post ID." }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/story.created": { "get": { "security": [], "summary": "story created", "description": "Event has occurred when story was created\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Story Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The story ID." }, "data": { "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/story.deleted": { "get": { "security": [], "summary": "story deleted", "description": "Event has occurred when story was deleted\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Story Information", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The story ID." }, "data": { "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/story.reactionAdded": { "get": { "security": [], "summary": "story reaction added", "description": "Event has occurred when a reaction is added to story\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Story Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The story ID." }, "data": { "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } } ] } } } } } } }, "/realtime/story.reactionRemoved": { "get": { "security": [], "summary": "story reaction removed", "description": "Event has occurred when a reaction is removed to story\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "Story Information", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The story ID." }, "data": { "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } } ] } } } } } } }, "/realtime/user.deleted": { "get": { "security": [], "summary": "user deleted", "description": "Event has occurred when user was deleted\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The user ID." }, "data": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/user.didGlobalBan": { "get": { "security": [], "summary": "user global banned", "description": "Event has occurred when user was global banned\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The user ID." }, "data": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/user.flagCleared": { "get": { "security": [], "summary": "user flag cleared", "description": "Event has occurred when the user flag was cleared\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The user ID." }, "data": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/user.flagged": { "get": { "security": [], "summary": "user flagged", "description": "Event has occurred when user was flagged\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The user ID." }, "data": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/user.unflagged": { "get": { "security": [], "summary": "user unflagged", "description": "Event has occurred when user was unflagged\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The user ID." }, "data": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/user.updated": { "get": { "security": [], "summary": "user updated", "description": "Event has occurred when user was updated\n", "tags": [ "Realtime event" ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The user ID." }, "data": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/room.startBroadcasting": { "get": { "security": [], "summary": "room started broadcasting", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.startBroadcasting event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The room ID", "example": "690c6a641b055f909ff1c8e1" }, "data": { "type": "object", "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } }, "description": "Array containing the room that started broadcasting" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "description": "Array of users involved in the room (e.g., host, participants)" }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } }, "description": "Array of files associated with the room (may be empty)" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "rooms": [ { "_id": "690c6a641b055f909ff1c8e1", "roomId": "690c6a641b055f909ff1c8e1", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "title": "e4920036-3dd4-4fc3-958c-072d520ba716", "liveChatEnabled": false, "childRoomIds": [], "participants": [ { "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "host" } ], "createdBy": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "directStreaming", "status": "idle", "isDeleted": false, "createdAt": "2025-11-06T09:29:08.260Z", "updatedAt": "2025-11-06T09:52:10.553Z", "creatorInternalId": "690c6a0bfb181288c0325726", "recordedPlaybackInfos": [] } ], "users": [ { "_id": "690c6a0bfb181288c0325726", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325726", "displayName": "Stamm - O'Reilly", "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825" } ], "files": [] }, "eventType": "room.startBroadcasting", "id": "690c6a641b055f909ff1c8e1", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T09:52:29.646Z", "version": 1 } } } } } } }, "/realtime/room.waitingReconnect": { "get": { "security": [], "summary": "room waiting for reconnection", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.waitingReconnect event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The room ID", "example": "690c6a641b055f909ff1c8e1" }, "data": { "type": "object", "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } }, "description": "Array containing the room waiting for reconnection" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "description": "Array of users involved in the room" }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } }, "description": "Array of files associated with the room (may be empty)" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "rooms": [ { "_id": "690c6a641b055f909ff1c8e1", "roomId": "690c6a641b055f909ff1c8e1", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "title": "e4920036-3dd4-4fc3-958c-072d520ba716", "liveChatEnabled": false, "childRoomIds": [], "participants": [ { "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "host" } ], "createdBy": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "directStreaming", "status": "waitingReconnect", "liveAt": "2025-11-06T09:52:35.917Z", "isDeleted": false, "createdAt": "2025-11-06T09:29:08.260Z", "updatedAt": "2025-11-06T09:53:31.644Z", "creatorInternalId": "690c6a0bfb181288c0325726", "livePlaybackUrl": "https://stream.mux.com/bD02uiCium1GTisHi4V2ifIPA1ZrGlzZKDck2IC2Drnc.m3u8?token=eyJhbGci...", "liveThumbnailUrl": "https://image.mux.com/bD02uiCium1GTisHi4V2ifIPA1ZrGlzZKDck2IC2Drnc/thumbnail.png?token=eyJhbGci...", "recordedPlaybackInfos": [] } ], "users": [ { "_id": "690c6a0bfb181288c0325726", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325726", "displayName": "Stamm - O'Reilly", "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825" } ], "files": [] }, "eventType": "room.waitingReconnect", "id": "690c6a641b055f909ff1c8e1", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T09:53:31.657Z", "version": 1 } } } } } } }, "/realtime/room.endBroadcasting": { "get": { "security": [], "summary": "room ended broadcasting", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.endBroadcasting event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The room ID", "example": "690c6a641b055f909ff1c8e1" }, "data": { "type": "object", "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } }, "description": "Array containing the room that ended broadcasting" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "description": "Array of users involved in the room" }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } }, "description": "Array of files associated with the room (may be empty)" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "rooms": [ { "_id": "690c6a641b055f909ff1c8e1", "roomId": "690c6a641b055f909ff1c8e1", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "title": "e4920036-3dd4-4fc3-958c-072d520ba716", "liveChatEnabled": false, "childRoomIds": [], "participants": [ { "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "host" } ], "createdBy": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "directStreaming", "status": "ended", "liveAt": "2025-11-06T09:52:35.917Z", "isDeleted": false, "createdAt": "2025-11-06T09:29:08.260Z", "updatedAt": "2025-11-06T09:54:15.601Z", "creatorInternalId": "690c6a0bfb181288c0325726", "recordedPlaybackInfos": [] } ], "users": [ { "_id": "690c6a0bfb181288c0325726", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325726", "displayName": "Stamm - O'Reilly", "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825" } ], "files": [] }, "eventType": "room.endBroadcasting", "id": "690c6a641b055f909ff1c8e1", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T09:54:16.192Z", "version": 1 } } } } } } }, "/realtime/room.recordingAvailable": { "get": { "security": [], "summary": "room recording is available", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.recordingAvailable event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The room ID", "example": "690c6a641b055f909ff1c8e1" }, "data": { "type": "object", "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } }, "description": "Array containing the room with available recording" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "description": "Array of users involved in the room" }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } }, "description": "Array of files associated with the room (may be empty)" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "rooms": [ { "_id": "690c6a641b055f909ff1c8e1", "roomId": "690c6a641b055f909ff1c8e1", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "title": "e4920036-3dd4-4fc3-958c-072d520ba716", "liveChatEnabled": false, "childRoomIds": [], "participants": [ { "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "host" } ], "createdBy": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "directStreaming", "status": "recorded", "durationSeconds": 101, "liveAt": "2025-11-06T09:52:35.917Z", "endedAt": "2025-11-06T09:54:16.180Z", "isDeleted": false, "createdAt": "2025-11-06T09:29:08.260Z", "updatedAt": "2025-11-06T09:54:17.147Z", "creatorInternalId": "690c6a0bfb181288c0325726", "recordedAt": "2025-11-06T09:54:17.147Z", "recordedPlaybackInfos": [ { "url": "https://api.dev.amity.co/api/v1/rooms/690c6a641b055f909ff1c8e1/recorded/3c6uIPDNcOxPxIhFy2A6DcmNRvW2qy5iFp1FE500Fflk/watch", "thumbnailUrl": "https://api.dev.amity.co/api/v1/rooms/690c6a641b055f909ff1c8e1/recorded/3c6uIPDNcOxPxIhFy2A6DcmNRvW2qy5iFp1FE500Fflk/thumbnail" } ] } ], "users": [ { "_id": "690c6a0bfb181288c0325726", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325726", "displayName": "Stamm - O'Reilly", "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825" } ], "files": [] }, "eventType": "room.recordingAvailable", "id": "690c6a641b055f909ff1c8e1", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T09:54:17.515Z", "version": 1 } } } } } } }, "/realtime/room.didUpdate": { "get": { "security": [], "summary": "room information updated", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.didUpdate event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The room ID", "example": "690c6a641b055f909ff1c8e1" }, "data": { "type": "object", "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } }, "description": "Array containing the updated room" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "description": "Array of users involved in the room" }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } }, "description": "Array of files associated with the room (may be empty)" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "rooms": [ { "_id": "690c6a641b055f909ff1c8e1", "roomId": "690c6a641b055f909ff1c8e1", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "title": "e4920036-3dd4-4fc3-958c-072d520ba716", "liveChatEnabled": true, "childRoomIds": [], "participants": [ { "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "host" } ], "createdBy": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "directStreaming", "status": "live", "liveAt": "2025-11-06T09:52:35.917Z", "isDeleted": false, "createdAt": "2025-11-06T09:29:08.260Z", "updatedAt": "2025-11-06T09:55:00.000Z", "creatorInternalId": "690c6a0bfb181288c0325726", "livePlaybackUrl": "https://stream.mux.com/bD02uiCium1GTisHi4V2ifIPA1ZrGlzZKDck2IC2Drnc.m3u8?token=eyJhbGci...", "liveThumbnailUrl": "https://image.mux.com/bD02uiCium1GTisHi4V2ifIPA1ZrGlzZKDck2IC2Drnc/thumbnail.png?token=eyJhbGci...", "recordedPlaybackInfos": [] } ], "users": [ { "_id": "690c6a0bfb181288c0325726", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325726", "displayName": "Stamm - O'Reilly", "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825" } ], "files": [] }, "eventType": "room.didUpdate", "id": "690c6a641b055f909ff1c8e1", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T09:55:00.123Z", "version": 1 } } } } } } }, "/realtime/room.terminated": { "get": { "security": [], "summary": "room was terminated", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.terminated event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The room ID", "example": "690c6a641b055f909ff1c8e1" }, "data": { "type": "object", "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } }, "description": "Array containing the terminated room" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "description": "Array of users involved in the room" }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } }, "description": "Array of files associated with the room (may be empty)" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "rooms": [ { "_id": "690c6a641b055f909ff1c8e1", "roomId": "690c6a641b055f909ff1c8e1", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "title": "e4920036-3dd4-4fc3-958c-072d520ba716", "liveChatEnabled": false, "childRoomIds": [], "participants": [ { "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "host" } ], "createdBy": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "directStreaming", "status": "terminated", "isDeleted": true, "createdAt": "2025-11-06T09:29:08.260Z", "updatedAt": "2025-11-06T10:00:00.000Z", "creatorInternalId": "690c6a0bfb181288c0325726", "recordedPlaybackInfos": [] } ], "users": [ { "_id": "690c6a0bfb181288c0325726", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325726", "displayName": "Stamm - O'Reilly", "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825" } ], "files": [] }, "eventType": "room.terminated", "id": "690c6a641b055f909ff1c8e1", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T10:00:00.456Z", "version": 1 } } } } } } }, "/realtime/room.participantJoined": { "get": { "security": [], "summary": "room participant joined", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.participantJoined event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The participant user ID", "example": "testuser123-456-789" }, "data": { "type": "object", "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } }, "description": "Array containing the room" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "description": "Array of users involved in the room" }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } }, "description": "Array of files associated with the room (may be empty)" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "rooms": [ { "_id": "690c6a641b055f909ff1c8e1", "roomId": "690c6a641b055f909ff1c8e1", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "title": "e4920036-3dd4-4fc3-958c-072d520ba716", "liveChatEnabled": false, "childRoomIds": [], "participants": [ { "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "host" }, { "userId": "testuser123-456-789", "type": "participant" } ], "createdBy": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "directStreaming", "status": "live", "liveAt": "2025-11-06T09:52:35.917Z", "isDeleted": false, "createdAt": "2025-11-06T09:29:08.260Z", "updatedAt": "2025-11-06T09:56:00.000Z", "creatorInternalId": "690c6a0bfb181288c0325726", "livePlaybackUrl": "https://stream.mux.com/bD02uiCium1GTisHi4V2ifIPA1ZrGlzZKDck2IC2Drnc.m3u8?token=eyJhbGci...", "liveThumbnailUrl": "https://image.mux.com/bD02uiCium1GTisHi4V2ifIPA1ZrGlzZKDck2IC2Drnc/thumbnail.png?token=eyJhbGci...", "recordedPlaybackInfos": [] } ], "users": [ { "_id": "690c6a0bfb181288c0325726", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325726", "displayName": "Stamm - O'Reilly", "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825" }, { "_id": "690c6a0bfb181288c0325727", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325727", "displayName": "New Participant", "userId": "testuser123-456-789" } ], "files": [] }, "eventType": "room.participantJoined", "id": "testuser123-456-789", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T09:56:00.123Z", "version": 1 } } } } } } }, "/realtime/room.participantLeft": { "get": { "security": [], "summary": "room participant left", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.participantLeft event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The participant user ID who left", "example": "testuser123-456-789" }, "data": { "type": "object", "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } }, "description": "Array containing the room" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "description": "Array of users involved in the room" }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } }, "description": "Array of files associated with the room (may be empty)" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "rooms": [ { "_id": "690c6a641b055f909ff1c8e1", "roomId": "690c6a641b055f909ff1c8e1", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "title": "e4920036-3dd4-4fc3-958c-072d520ba716", "liveChatEnabled": false, "childRoomIds": [], "participants": [ { "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "host" } ], "createdBy": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "directStreaming", "status": "live", "liveAt": "2025-11-06T09:52:35.917Z", "isDeleted": false, "createdAt": "2025-11-06T09:29:08.260Z", "updatedAt": "2025-11-06T09:57:00.000Z", "creatorInternalId": "690c6a0bfb181288c0325726", "livePlaybackUrl": "https://stream.mux.com/bD02uiCium1GTisHi4V2ifIPA1ZrGlzZKDck2IC2Drnc.m3u8?token=eyJhbGci...", "liveThumbnailUrl": "https://image.mux.com/bD02uiCium1GTisHi4V2ifIPA1ZrGlzZKDck2IC2Drnc/thumbnail.png?token=eyJhbGci...", "recordedPlaybackInfos": [] } ], "users": [ { "_id": "690c6a0bfb181288c0325726", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325726", "displayName": "Stamm - O'Reilly", "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825" }, { "_id": "690c6a0bfb181288c0325727", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325727", "displayName": "New Participant", "userId": "testuser123-456-789" } ], "files": [] }, "eventType": "room.participantLeft", "id": "testuser123-456-789", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T09:57:00.456Z", "version": 1 } } } } } } }, "/realtime/room.participantRemoved": { "get": { "security": [], "summary": "room participant removed", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.participantRemoved event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The participant user ID who was removed", "example": "testuser123-456-789" }, "data": { "type": "object", "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Internal room ID" }, "type": { "type": "string", "enum": [ "directStreaming", "coHosts" ], "description": "Type of room * directStreaming - single participant streaming * coHosts - More than one participant\n" }, "targetId": { "type": "string", "description": "ID of the target of the entity that room belongs to" }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Target of the entity that room belongs to" }, "referenceType": { "type": "string", "description": "Entity that room is associated with", "enum": [ "post" ] }, "referenceId": { "type": "string", "description": "Entity ID that room is associated with" }, "liveChannelId": { "type": "string", "description": "Associated live channel ID for chat" }, "liveChatEnabled": { "type": "boolean", "description": "Whether live channel is enabled" }, "title": { "type": "string", "description": "Room title" }, "roomId": { "type": "string", "description": "Public room ID" }, "description": { "type": "string", "description": "Room description" }, "thumbnailFileId": { "type": "string", "description": "Thumbnail file ID" }, "status": { "type": "string", "enum": [ "idle", "live", "waitingReconnect", "ended", "recorded" ], "description": "Status of room * idle - room is just created * live - broadcasting is active * waitingReconnect - broadcaster disconnected, waiting for reconnection * ended - broadcasting stopped * recorded - room recordings available\n" }, "participants": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "coHost", "host" ] }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" } } }, "description": "List of room streaming participants" }, "livePlaybackUrl": { "type": "string", "description": "Live playback URL", "example": "https://stream.example.com/someid.m3u8?token=token" }, "liveThumbnailUrl": { "type": "string", "description": "Live thumbnail URL", "example": "https://image.example.com/someid/thumbnail.png?token=token" }, "recordedPlaybackInfos": { "type": "array", "description": "Recorded playback URLs and thumbnails", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "Recorded playback URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/watch" }, "thumbnailUrl": { "type": "string", "description": "Recorded thumbnail URL", "example": "https://apix.eu.amity.co/api/v1/rooms/roomid/recorded/someid/thumbnail" } } } }, "durationSeconds": { "type": "number", "description": "Duration of the broadcast in seconds (only for ended/recorded rooms)" }, "moderation": { "type": "object", "description": "Moderation information including flagged and terminated labels", "properties": { "flagLabels": { "type": "array", "description": "Labels that triggered flag actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered the flag" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the flag was detected" } } } }, "terminateLabels": { "type": "array", "description": "Labels that triggered terminate actions", "items": { "type": "object", "properties": { "category": { "type": "string", "description": "Moderation category" }, "threshold": { "type": "number", "description": "Threshold value that triggered termination" }, "detectedAt": { "type": "string", "format": "date-time", "description": "When the termination was detected" } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last moderation update timestamp" } } }, "parentRoomId": { "type": "string", "description": "Parent room ID for child streams" }, "childRoomIds": { "type": "array", "items": { "type": "string" }, "description": "Child room IDs", "default": [] }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "createdBy": { "type": "string", "description": "Room creator user public ID" }, "creatorInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f", "description": "Room creator user internal ID" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "liveAt": { "type": "string", "format": "date-time", "description": "When broadcasting started" }, "endedAt": { "type": "string", "format": "date-time", "description": "When broadcasting ended" }, "recordedAt": { "type": "string", "format": "date-time", "description": "When recording became available" }, "isDeleted": { "type": "boolean", "description": "Whether room is deleted" }, "deletedAt": { "type": "string", "format": "date-time", "description": "Deletion timestamp" }, "deletedBy": { "type": "string", "description": "User who deleted the room" }, "path": { "type": "string", "description": "Room path for realtime events" }, "metadata": { "type": "object", "description": "Custom metadata" } } }, "description": "Array containing the room" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "description": "Array of users involved in the room" }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } }, "description": "Array of files associated with the room (may be empty)" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "rooms": [ { "_id": "690c6a641b055f909ff1c8e1", "roomId": "690c6a641b055f909ff1c8e1", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "title": "e4920036-3dd4-4fc3-958c-072d520ba716", "liveChatEnabled": false, "childRoomIds": [], "participants": [ { "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "host" } ], "createdBy": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "type": "directStreaming", "status": "live", "liveAt": "2025-11-06T09:52:35.917Z", "isDeleted": false, "createdAt": "2025-11-06T09:29:08.260Z", "updatedAt": "2025-11-06T09:58:00.000Z", "creatorInternalId": "690c6a0bfb181288c0325726", "livePlaybackUrl": "https://stream.mux.com/bD02uiCium1GTisHi4V2ifIPA1ZrGlzZKDck2IC2Drnc.m3u8?token=eyJhbGci...", "liveThumbnailUrl": "https://image.mux.com/bD02uiCium1GTisHi4V2ifIPA1ZrGlzZKDck2IC2Drnc/thumbnail.png?token=eyJhbGci...", "recordedPlaybackInfos": [] } ], "users": [ { "_id": "690c6a0bfb181288c0325726", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325726", "displayName": "Stamm - O'Reilly", "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825" }, { "_id": "690c6a0bfb181288c0325727", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325727", "displayName": "Removed Participant", "userId": "testuser123-456-789" } ], "files": [] }, "eventType": "room.participantRemoved", "id": "testuser123-456-789", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T09:58:00.789Z", "version": 1 } } } } } } }, "/realtime/room.usersBanned": { "get": { "security": [], "summary": "room users banned", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.usersBanned event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The room ID", "example": "690c6a641b055f909ff1c8e1" }, "data": { "type": "object", "properties": { "userIds": { "type": "array", "items": { "type": "string" }, "description": "Array of user IDs that were banned" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "userIds": [ "banneduser1-123-456", "banneduser2-789-012" ] }, "eventType": "room.usersBanned", "id": "690c6a641b055f909ff1c8e1", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T09:59:00.123Z", "version": 1 } } } } } } }, "/realtime/room.usersUnbanned": { "get": { "security": [], "summary": "room users unbanned", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.usersUnbanned event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The room ID", "example": "690c6a641b055f909ff1c8e1" }, "data": { "type": "object", "properties": { "userIds": { "type": "array", "items": { "type": "string" }, "description": "Array of user IDs that were unbanned" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "userIds": [ "unbanneduser1-123-456", "unbanneduser2-789-012" ] }, "eventType": "room.usersUnbanned", "id": "690c6a641b055f909ff1c8e1", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/room/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T10:00:00.456Z", "version": 1 } } } } } } }, "/realtime/room.didCohostInvite": { "get": { "security": [], "summary": "room cohost invitation created", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.didCohostInvite event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The invited user ID (internal)", "example": "690c6a0bfb181288c0325727" }, "data": { "type": "object", "properties": { "invitations": { "type": "array", "items": { "type": "object" }, "description": "Array containing the invitation details" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "description": "Array of users involved (inviter and invitee)" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "invitations": [ { "_id": "690c6b1a2b055f909ff1c9a1", "networkId": "606f37a0ae601e3c33eba9e3", "type": "livestreamCohostInvite", "targetId": "690c6a641b055f909ff1c8e1", "targetType": "room", "userId": "690c6a0bfb181288c0325727", "status": "pending", "createdBy": "690c6a0bfb181288c0325726", "respondedAt": null, "createdAt": "2025-11-06T10:01:00.000Z", "updatedAt": "2025-11-06T10:01:00.000Z", "invitationId": "690c6b1a2b055f909ff1c9a1", "invitedUserId": "testcohost-456-789", "invitedUserPublicId": "testcohost-456-789", "invitedUserInternalId": "690c6a0bfb181288c0325727", "inviterUserId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "inviterUserPublicId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "inviterUserInternalId": "690c6a0bfb181288c0325726" } ], "users": [ { "_id": "690c6a0bfb181288c0325726", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325726", "displayName": "Stamm - O'Reilly", "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825" }, { "_id": "690c6a0bfb181288c0325727", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325727", "displayName": "Invited Co-host", "userId": "testcohost-456-789" } ] }, "eventType": "room.didCohostInvite", "id": "690c6a0bfb181288c0325727", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/rooms/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T10:01:00.123Z", "version": 1 } } } } } } }, "/realtime/room.didCohostInviteAccept": { "get": { "security": [], "summary": "room cohost invitation accepted", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.didCohostInviteAccept event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The accepted user ID (internal)", "example": "690c6a0bfb181288c0325727" }, "data": { "type": "object", "properties": { "invitations": { "type": "array", "items": { "type": "object" }, "description": "Array containing the invitation details" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "description": "Array of users involved (inviter and invitee)" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "invitations": [ { "_id": "690c6b1a2b055f909ff1c9a1", "networkId": "606f37a0ae601e3c33eba9e3", "type": "livestreamCohostInvite", "targetId": "690c6a641b055f909ff1c8e1", "targetType": "room", "userId": "690c6a0bfb181288c0325727", "status": "approved", "createdBy": "690c6a0bfb181288c0325726", "respondedAt": "2025-11-06T10:02:00.000Z", "createdAt": "2025-11-06T10:01:00.000Z", "updatedAt": "2025-11-06T10:02:00.000Z", "invitationId": "690c6b1a2b055f909ff1c9a1", "invitedUserId": "testcohost-456-789", "invitedUserPublicId": "testcohost-456-789", "invitedUserInternalId": "690c6a0bfb181288c0325727", "inviterUserId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "inviterUserPublicId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "inviterUserInternalId": "690c6a0bfb181288c0325726" } ], "users": [ { "_id": "690c6a0bfb181288c0325726", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325726", "displayName": "Stamm - O'Reilly", "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825" }, { "_id": "690c6a0bfb181288c0325727", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325727", "displayName": "Invited Co-host", "userId": "testcohost-456-789" } ] }, "eventType": "room.didCohostInviteAccept", "id": "690c6a0bfb181288c0325727", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/rooms/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T10:02:00.456Z", "version": 1 } } } } } } }, "/realtime/room.didCohostInviteReject": { "get": { "security": [], "summary": "room cohost invitation rejected", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.didCohostInviteReject event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The rejecting user ID (internal)", "example": "690c6a0bfb181288c0325727" }, "data": { "type": "object", "properties": { "invitations": { "type": "array", "items": { "type": "object" }, "description": "Array containing the invitation details" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "description": "Array of users involved (inviter and invitee)" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "invitations": [ { "_id": "690c6b1a2b055f909ff1c9a1", "networkId": "606f37a0ae601e3c33eba9e3", "type": "livestreamCohostInvite", "targetId": "690c6a641b055f909ff1c8e1", "targetType": "room", "userId": "690c6a0bfb181288c0325727", "status": "rejected", "createdBy": "690c6a0bfb181288c0325726", "respondedAt": "2025-11-06T10:03:00.000Z", "createdAt": "2025-11-06T10:01:00.000Z", "updatedAt": "2025-11-06T10:03:00.000Z", "invitationId": "690c6b1a2b055f909ff1c9a1", "invitedUserId": "testcohost-456-789", "invitedUserPublicId": "testcohost-456-789", "invitedUserInternalId": "690c6a0bfb181288c0325727", "inviterUserId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "inviterUserPublicId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "inviterUserInternalId": "690c6a0bfb181288c0325726" } ], "users": [ { "_id": "690c6a0bfb181288c0325726", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325726", "displayName": "Stamm - O'Reilly", "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825" }, { "_id": "690c6a0bfb181288c0325727", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325727", "displayName": "Invited Co-host", "userId": "testcohost-456-789" } ] }, "eventType": "room.didCohostInviteReject", "id": "690c6a0bfb181288c0325727", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/rooms/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T10:03:00.789Z", "version": 1 } } } } } } }, "/realtime/room.didCohostInviteCancel": { "get": { "security": [], "summary": "room cohost invitation cancelled", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for room.didCohostInviteCancel event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The invited user ID (internal)", "example": "690c6a0bfb181288c0325727" }, "data": { "type": "object", "properties": { "invitations": { "type": "array", "items": { "type": "object" }, "description": "Array containing the invitation details" }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] }, "description": "Array of users involved (inviter and invitee)" } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "example": { "data": { "invitations": [ { "_id": "690c6b1a2b055f909ff1c9a1", "networkId": "606f37a0ae601e3c33eba9e3", "type": "livestreamCohostInvite", "targetId": "690c6a641b055f909ff1c8e1", "targetType": "room", "userId": "690c6a0bfb181288c0325727", "status": "cancelled", "createdBy": "690c6a0bfb181288c0325726", "respondedAt": "2025-11-06T10:04:00.000Z", "createdAt": "2025-11-06T10:01:00.000Z", "updatedAt": "2025-11-06T10:04:00.000Z", "invitationId": "690c6b1a2b055f909ff1c9a1", "invitedUserId": "testcohost-456-789", "invitedUserPublicId": "testcohost-456-789", "invitedUserInternalId": "690c6a0bfb181288c0325727", "inviterUserId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "inviterUserPublicId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825", "inviterUserInternalId": "690c6a0bfb181288c0325726" } ], "users": [ { "_id": "690c6a0bfb181288c0325726", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325726", "displayName": "Stamm - O'Reilly", "userId": "teste2c39fe5-d5fc-4943-a9be-cf54ad4d0825" }, { "_id": "690c6a0bfb181288c0325727", "path": "606f37a0ae601e3c33eba9e3/user/690c6a0bfb181288c0325727", "displayName": "Invited Co-host", "userId": "testcohost-456-789" } ] }, "eventType": "room.didCohostInviteCancel", "id": "690c6a0bfb181288c0325727", "networkId": "606f37a0ae601e3c33eba9e3", "path": "606f37a0ae601e3c33eba9e3/rooms/690c6a641b055f909ff1c8e1", "senderId": "asc-app-c1-588c759896-pmzz8-1", "sentTime": "2025-11-06T10:04:00.012Z", "version": 1 } } } } } } }, "/realtime/video-streaming.viewerDidBan": { "get": { "security": [], "summary": "video-streaming viewer did ban", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for video-streaming.viewerDidBan event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "list": { "type": "array", "items": { "type": "object", "properties": { "networkId": { "type": "string" }, "channelId": { "type": "string" }, "userId": { "type": "string" }, "actor": { "type": "string" }, "createdAt": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } }, "/realtime/video-streaming.viewerDidUnban": { "get": { "security": [], "summary": "video-streaming viewer did unban", "tags": [ "Realtime event" ], "responses": { "200": { "description": "RTE data for video-streaming.viewerDidUnBan event", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "list": { "type": "array", "items": { "type": "object", "properties": { "networkId": { "type": "string" }, "channelId": { "type": "string" }, "userId": { "type": "string" }, "actor": { "type": "string" }, "createdAt": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } } } } } }, "components": { "securitySchemes": { "ApiKeyAuth": { "type": "apiKey", "in": "header", "name": "X-API-Key" }, "BearerAuth": { "type": "http", "scheme": "bearer" } }, "schemas": { "PrehookSettingWithSecretKey": { "allOf": [ { "description": "Prehook Setting", "type": "object", "properties": { "enabled": { "type": "boolean" }, "callbackUrl": { "type": "string" }, "defaultAction": { "type": "string", "enum": [ "allow", "deny" ] } } }, { "type": "object", "properties": { "secretKey": { "type": "string", "description": "This will be available only when regenerateKey or enable the feature for the first time" } } } ] }, "StoryWithTargetResponsePayload": { "allOf": [ { "description": "Story response payload", "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } }, { "type": "object", "properties": { "storyTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Type of a target (user, community, content)." }, "lastStoryExpiresAt": { "type": "string", "description": "The expired date/time of the latest story created in target. Provided if there is any active story in target.", "format": "date-time" }, "lastStorySeenExpiresAt": { "type": "string", "description": "The expired date/time of the latest story the user has seen. Provided if user has seen any story in target.", "format": "date-time" }, "targetUpdatedAt": { "type": "string", "description": "The date/time when a target is updated. Used for validating the seen state on SDK side", "format": "date-time" } }, "required": [ "targetId", "targetPublicId", "targetType", "targetUpdatedAt" ] } } } } ] }, "StoryWithTargetPaginatedResponsePayload": { "allOf": [ { "allOf": [ { "description": "Story response payload", "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } }, { "type": "object", "properties": { "storyTargets": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "community", "user" ], "description": "Type of a target (user, community, content)." }, "lastStoryExpiresAt": { "type": "string", "description": "The expired date/time of the latest story created in target. Provided if there is any active story in target.", "format": "date-time" }, "lastStorySeenExpiresAt": { "type": "string", "description": "The expired date/time of the latest story the user has seen. Provided if user has seen any story in target.", "format": "date-time" }, "targetUpdatedAt": { "type": "string", "description": "The date/time when a target is updated. Used for validating the seen state on SDK side", "format": "date-time" } }, "required": [ "targetId", "targetPublicId", "targetType", "targetUpdatedAt" ] } } } } ] }, { "type": "object", "properties": { "paging": { "type": "object", "properties": { "next": { "type": "string", "description": "The next token to get the next page of stories." }, "previous": { "type": "string", "description": "The previous token to get the previous page of stories." } } } } } ] }, "StoryWithReferenceId": { "allOf": [ { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] }, { "type": "object", "properties": { "referenceId": { "type": "string", "description": "the id used for reference when optimistically create the story. only avaliable in create story API" } } } ] }, "Channel": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "channels": { "description": "The list of channels", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "path": { "type": "string" }, "channelId": { "type": "string", "description": "ID of a channel." }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "isDistinct": { "type": "boolean" }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "type": { "type": "string", "enum": [ "standard", "private", "conversation", "broadcast", "community", "live" ], "description": "Channel Type:\n * `standard` - Standard channel (deprecated) is public everyone can search and join this channel.\n * `private` - Private channel (deprecated) is private only member can search and found this channel.\n * `conversation` - Conversation channel is direct chat created by both users.\n * `broadcast` - Broadcast channel is send message by admin only\n * `community` - rename from Standard channel\n * `live` - rename from Private channel\n" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "isMuted": { "type": "boolean", "description": "Is this channel muted? (Computed by using muteTimeout)." }, "isRateLimited": { "type": "boolean", "description": "Is this channel limited sending rate? (Computed by using muteTimeout)." }, "muteTimeout": { "type": "string", "description": "The date/time to suppress muteness.", "format": "date-time" }, "rateLimit": { "type": "integer", "description": "Number of messages within rate limit." }, "rateLimitWindow": { "type": "integer", "description": "Waiting time interval before reset rateLimit to 0." }, "rateLimitTimeout": { "type": "string", "description": "The date/time to suppress limitation of sending rate.", "format": "date-time" }, "displayName": { "type": "string", "description": "Channel name for displaying." }, "messageAutoDeleteEnabled": { "type": "boolean", "description": "Is message in this channel will be deleted when the user flagged until flag limit?" }, "autoDeleteMessageByFlagLimit": { "type": "number", "description": "Number of flags that will force a message to be deleted automatically." }, "memberCount": { "type": "integer", "description": "Number of members in channel." }, "messageCount": { "type": "integer", "description": "Number of messages in channel." }, "lastActivity": { "type": "string", "description": "The date/time when a user last did something related to the channel such as add/remove members .", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel is updated.", "format": "date-time" }, "avatarFileId": { "type": "string" }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a channel." }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." }, "isPublic": { "type": "boolean", "description": "A flag to public or private a channel." }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "attachedTo": { "type": "object", "properties": { "postId": { "type": "string" }, "videoStreamId": { "type": "string" }, "roomId": { "type": "string" } } } }, "required": [ "channelId", "createdAt", "updatedAt" ] } }, "channelUsers": { "description": "The list of channel users", "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "channelId": { "type": "string" }, "channelInternalId": { "type": "string" }, "channelPublicId": { "type": "string" }, "membership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "isBanned": { "type": "boolean" }, "lastActivity": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "readToSegment": { "type": "integer" }, "lastMentionedSegment": { "type": "integer" }, "isMuted": { "type": "boolean" }, "muteTimeout": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a channel user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a channel user is updated.", "format": "date-time" } } } }, "users": { "description": "The list of users", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "description": "The list of files", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "schema_Comment": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The comment ID." }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "CommentWithReactor": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The comment ID." }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } } ] }, "CommentWithFlag": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The comment ID." }, "data": { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "commentChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "flaggedUserId": { "type": "string", "description": "ID of the User has been flagged" } } } } } ] }, "schema_Community": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The community ID." }, "data": { "type": "object", "properties": { "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "schema_Follow": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "object", "properties": { "follows": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "fromUserPublicId": { "type": "string" }, "fromUserInternalId": { "type": "string" }, "to": { "type": "string" }, "toUserPublicId": { "type": "string" }, "toUserInternalId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "accepted", "none" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "schema_MessageFeed": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message feed ID." }, "data": { "type": "object", "properties": { "messageFeeds": { "description": "the list of message feed", "type": "array", "items": { "type": "object", "properties": { "messageFeedId": { "description": "The ID of the message feed", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "channelId": { "description": "Internal ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelPublicId": { "description": "ID of the channel that the message feed belongs to", "type": "string", "maxLength": 30, "example": "abc665aed9dbb8d036037eeb" }, "channelType": { "description": "Type of the channel that the message feed belongs to", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "name": { "description": "The name of the message feed", "type": "string", "maxLength": 100, "example": "text" }, "lastMessageId": { "description": "The ID of the last message created in the message feed", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b21" }, "lastMessageTimestamp": { "description": "The created timestamp of the the last message created in the message feed", "type": "string", "format": "date-time" }, "creatorId": { "description": "Creator's ID", "type": "string", "maxLength": 30, "example": "8aa313c8dbb00af911b07672" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "childCount": { "description": "The number of messages inside the message feed", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The edited timestamp of the message feed data", "type": "string", "format": "date-time" }, "createdAt": { "description": "The created timestamp of the message feed", "type": "string", "format": "date-time" }, "updatedAt": { "description": "The updated timestamp of the message feed", "type": "string", "format": "date-time" }, "messagePreviewId": { "type": "string", "description": "ID of a message preview. Depends on network settings. if disabled will be null." } }, "required": [ "messageFeedId", "channelId", "channelPublicId", "channelType", "name", "creatorId", "path", "childCount", "isDeleted", "createdAt", "updatedAt" ] } }, "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "MessageWithReactionBase": { "allOf": [ { "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } }, { "type": "object", "properties": { "reactions": { "description": "The reaction added/removed to the message", "type": "array", "items": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } ] }, "MessageWithReaction": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "allOf": [ { "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } }, { "type": "object", "properties": { "reactions": { "description": "The reaction added/removed to the message", "type": "array", "items": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } ] } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "MessageCreated": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" }, "referenceId": { "description": "A reference ID", "type": "string", "maxLength": 30, "example": "1530b11ec8df87da22b06b27" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "schema_Message": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The message ID." }, "data": { "type": "object", "properties": { "messages": { "description": "The list of message", "type": "array", "items": { "type": "object", "properties": { "messageId": { "description": "A message ID", "type": "string", "maxLength": 30, "example": "a85dca058f5b585f86a29f14" }, "networkId": { "description": "A network ID", "type": "string", "maxLength": 30, "example": "9530b11ec8de87db22b06b27" }, "channelId": { "description": "Channel id of message", "type": "string", "maxLength": 24, "example": "abc665aed9dbb8d036037eed" }, "channelType": { "description": "Channel type of message", "type": "string", "enum": [ "broadcast", "community", "conversation", "live" ], "example": "community" }, "messageFeedId": { "description": "Message feed id of message", "type": "string", "maxLength": 30, "example": "507f191e810c19729de860ea" }, "segment": { "description": "Segment of message in sub feed", "type": "number", "format": "int32" }, "dataType": { "description": "Type of data", "type": "string", "maxLength": 20, "example": "text" }, "data": { "description": "A custom object for storing message. The size of this object must be less than 10 kb.", "type": "object", "example": { "text": "test" } }, "fileId": { "description": "File id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364d" }, "thumbnailFileId": { "description": "Thumbnail file id", "type": "string", "maxLength": 30, "example": "76bfe68974157a114053364e" }, "metadata": { "description": "A custom object for storing the other data. The size of this object must be less than 20 kb.", "type": "object", "example": { "refId": "d601c27c0675baa2103ec573" } }, "tags": { "description": "List of tags for searching", "type": "array", "maxItems": 10, "default": [], "items": { "type": "string", "maxLength": 30 }, "example": [ "tag1", "tag2" ] }, "creatorId": { "description": "A creator ID", "type": "string", "maxLength": 24, "example": "5349b4ddd2781d08c09890f4" }, "mentionedUsers": { "description": "List of mentioned users", "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "maxLength": 20, "default": "user", "enum": [ "channel", "user" ] }, "userIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "maxLength": 24 }, "example": [ "3cac302ab992aa17b215ba21", "adb34ec2aeedca03a38e1d54" ] } } } }, "reactions": { "description": "List of reactions", "type": "object", "items": { "type": "object", "additionalProperties": { "type": "number" } }, "example": { "like": 1, "love": 2 } }, "reactionCount": { "description": "Total number of reactions", "type": "number", "format": "int32" }, "parentId": { "description": "Parent id of message", "type": "string", "maxLength": 30, "example": "abc665afd7dbb8d036037eea" }, "path": { "description": "Object path", "type": "string", "maxLength": 200, "example": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239" }, "flagCount": { "description": "The number of flags", "type": "number", "format": "int32" }, "childCount": { "description": "The number of children message", "type": "number", "format": "int32" }, "isDeleted": { "description": "Soft delete flag", "type": "boolean", "default": false }, "editedAt": { "description": "The latest date/time of changes in message data", "type": "string", "format": "date-time" }, "createdAt": { "description": "A created date/time of message", "type": "string", "format": "date-time" }, "updatedAt": { "description": "A updated date/time of message", "type": "string", "format": "date-time" } } } }, "files": { "description": "The list of file", "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "description": "The list of user", "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "displayName": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "schema_Post": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The post ID." }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "PostWithReactor": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The post ID." }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } } ] }, "PostWithFlag": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The post ID." }, "data": { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "postChildren": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a post. (for real-time event)" }, "path": { "type": "string", "description": "Path of a post. (for real-time event)" }, "postId": { "type": "string", "description": "ID of a post." }, "parentPostId": { "type": "string", "description": "ID of a parent post." }, "postedUserId": { "type": "string", "description": "ID of a creator." }, "postedUserPublicId": { "type": "string", "description": "Public ID of a creator." }, "postedUserInternalId": { "type": "string", "description": "Internal ID of a creator." }, "sharedUserId": { "type": "string", "description": "ID of a shared owner." }, "sharedCount": { "type": "integer", "description": "number of shared post." }, "targetId": { "type": "string", "description": "ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetInternalId": { "type": "string", "description": "Internal ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community", "content" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "file", "video", "liveStream" ], "description": "Type of a post (ex. text, image, file, video or anything in namespace like format (a.b.c.d)).", "default": "text" }, "data": { "type": "object", "description": "Body of a post. (It can be anything when dataType is not text, image, file)", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image, file post)." }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video post)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video post).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } }, "streamId": { "type": "string", "description": "parent video streaming id (for video streaming post) - must be a parent stream" } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "editedAt": { "type": "string", "description": "The date/time when text or metadata of post is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a post is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a post is updated or deleted.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "comments": { "type": "array", "items": { "type": "string", "description": "ID of a comment." } }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children post." } }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a post." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedChildren": { "type": "boolean", "default": false, "description": "The flag for checking internally that children post is reported or not." }, "feedId": { "type": "string", "description": "Feed public id" }, "tags": { "type": "array", "minItems": 0, "maxItems": 5, "items": { "type": "string", "maxLength": 24 } }, "hashtags": { "type": "array", "minItems": 0, "maxItems": 30, "items": { "type": "string", "maxLength": 100, "example": "social_media" }, "example": [ "social_media", "community_building", "real_time", "engagement_boost" ], "description": "Hashtags associated with the post." }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer" }, "reach": { "type": "integer" } }, "required": [ "postId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } }, "feeds": { "type": "array", "items": { "type": "object", "properties": { "targetId": { "type": "string", "description": "Target public id (community id or user id)" }, "targetType": { "type": "string", "description": "Target that feed belong to", "enum": [ "community", "user" ] }, "postCount": { "type": "number", "description": "Post count in feed" }, "feedType": { "type": "string", "description": "Feed type\n- published: main feed\n- reviewing: feed for things that have to be reviewed\n- declined: feed for things that is rejected from reviewing\n", "enum": [ "published", "reviewing", "declined" ] }, "feedId": { "type": "string", "description": "Feed public id" }, "createdAt": { "type": "string", "description": "The date/time when a feed is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a feed is updated.", "format": "date-time" } } } }, "videoStreamings": { "type": "array", "items": { "type": "object", "properties": { "streamId": { "type": "string" }, "userId": { "type": "string", "description": "Streaming creator user id" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "thumbnailFileId": { "type": "string", "description": "Thumbnaiil file id" }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "idle", "live", "ended", "recorded" ], "description": "Status of livestreaming * idle - streaming is just created * live - streamer is streaming now or streamer is reconnecting * ended - streamer stop streaming or streamer disconnect and not connect back in time period * recorded - live stream recordings available \n" }, "isLive": { "type": "boolean", "description": "Deprecated (was used before for checking live status)" }, "isDeleted": { "type": "boolean", "description": "Is streaming deleted?" }, "description": { "type": "string" }, "platform": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "moderationId": { "type": "string", "description": "Moderation id" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "object" }, "resolution": { "type": "string", "enum": [ "SD", "HD", "FHD" ], "default": "SD" }, "streamerUrl": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "recordings": { "type": "array", "items": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "mp4": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } }, "m3u8": { "type": "object", "properties": { "url": { "type": "string" }, "duration": { "type": "number" }, "startTime": { "type": "number" }, "stopTime": { "type": "number" } } } } } }, "watcherUrl": { "type": "object", "properties": { "flv": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "hls": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } }, "rtmp": { "type": "object", "properties": { "url": { "type": "string" }, "components": { "type": "object", "properties": { "origin": { "type": "string" }, "appName": { "type": "string" }, "streamName": { "type": "string" }, "query": { "type": "string" } } } } } } }, "postId": { "type": "string" }, "channelId": { "type": "string" }, "channelEnabled": { "type": "boolean" }, "isParent": { "type": "boolean", "description": "Indicates if this is a parent stream (logical container) or child stream (actual video feed)", "default": false }, "parentStreamId": { "type": "string", "description": "Public ID of the parent stream (null for parent streams, parent's streamId for child streams)", "nullable": true }, "childStreamIds": { "type": "array", "items": { "type": "string" }, "description": "Array of child stream IDs (for parent streams only, empty for child streams)", "default": [] } } } }, "polls": { "type": "array", "items": { "type": "object", "properties": { "pollId": { "type": "string" }, "userId": { "type": "string" }, "userInternalId": { "type": "string", "example": "64be1f6cb9b4106b5a6bbf3f" }, "userPublicId": { "type": "string", "example": "User123" }, "title": { "type": "string", "maxLength": 150, "description": "Poll title with maximum 150 characters" }, "question": { "type": "string", "description": "question." }, "answers": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "dataType": { "type": "string", "enum": [ "text", "image" ] }, "data": { "type": "string" }, "fileId": { "description": "image fileId, required only when dataType is image", "type": "string" }, "voteCount": { "type": "number", "default": 0 }, "isVotedByUser": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "Option id" } } } }, "answerType": { "type": "string" }, "closedAt": { "type": "string" }, "createdAt": { "type": "string" }, "isVoted": { "type": "boolean", "default": false }, "status": { "type": "string", "default": "open" }, "closedIn": { "type": "number" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "flaggedUserId": { "type": "string", "description": "ID of the User has been flagged" } } } } } ] }, "schema_Story": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The story ID." }, "data": { "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, "StoryWithReactor": { "allOf": [ { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The story ID." }, "data": { "type": "object", "properties": { "stories": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string", "description": "ID of a post." }, "path": { "type": "string", "description": "Path of a story." }, "creatorId": { "type": "string", "description": "Internal ID of a creator." }, "creatorPublicId": { "type": "string", "description": "Public ID of a creator." }, "targetId": { "type": "string", "description": "Internal ID of a target." }, "targetPublicId": { "type": "string", "description": "Public ID of a target." }, "targetType": { "type": "string", "enum": [ "user", "community" ], "description": "Type of a target (user, community, content)." }, "dataType": { "type": "string", "enum": [ "text", "image", "video" ] }, "items": { "type": "array", "description": "List of story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "items": { "type": "object", "description": "Story item. Currently support only hyperlink item. Only one hyperlink item is allowed per story.", "properties": { "type": { "type": "string", "description": "Type of the story item. Currently support only hyperlink", "enum": [ "hyperlink" ], "default": "hyperlink" }, "data": { "oneOf": [ { "type": "object", "description": "Data of a hyperlink item. Required when item type is hyperlink.", "properties": { "url": { "type": "string", "description": "URL of the hyperlink.", "maxLength": 1000 }, "customText": { "type": "string", "description": "Custom text of the hyperlink.", "maxLength": 30 } }, "required": [ "url" ] } ] }, "placement": { "type": "object", "description": "Placement of the item in the story. Currently not supported.", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "transform": { "type": "object", "properties": { "translate_x": { "type": "number", "description": "Translation in the x-axis (in pixels)" }, "translate_y": { "type": "number", "description": "Translation in the y-axis (in pixels)" }, "scale_x": { "type": "number", "description": "Scale factor for the x-axis" }, "scale_y": { "type": "number", "description": "Scale factor for the y-axis" }, "rotate": { "type": "number", "description": "Rotation angle in degrees" } } } }, "required": [ "data" ] } }, "example": { "type": "hyperlink", "data": { "url": "https://www.google.com", "customText": "Google" } } }, "maxItems": 10, "default": [] }, "data": { "type": "object", "description": "Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.", "properties": { "text": { "type": "string", "description": "post text." }, "fileId": { "type": "string", "description": "file key on cloud storage (for image type)." }, "imageDisplayMode": { "type": "string", "description": "image display mode (available if dataType is image) represents the display mode of an image for maintaining the correct visual dimensions when displaying or processing image.\n", "enum": [ "fit", "fill" ], "default": "fit" }, "thumbnailFileId": { "type": "string", "description": "video thumbnail file id (for video type)." }, "videoFileId": { "type": "object", "description": "video file id for each quality (for video type).", "properties": { "original": { "type": "string", "description": "original file id" }, "low": { "type": "string", "description": "low video quality file id" }, "medium": { "type": "string", "description": "medium video quality file id" }, "high": { "type": "string", "description": "high video quality file id" } } } } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "flagCount": { "type": "integer", "description": "The number of users that has read this post." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this post is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "createdAt": { "type": "string", "description": "The date/time when a story is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a story is deleted.", "format": "date-time" }, "expiresAt": { "type": "string", "description": "The date/time when a story is going to be expired.", "format": "date-time" }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this post.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this post." }, "commentsCount": { "type": "integer", "description": "The number of all comments for this post.", "example": 1 }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a story." }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "mentionedUsers": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user", "channel" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } } } } }, "impression": { "type": "integer", "description": "Number of non-unique user view of the story" }, "reach": { "type": "integer", "description": "Number of unique user view of the story" } }, "required": [ "storyId", "data" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a comment. (for real-time event)" }, "path": { "type": "string", "description": "Path of a comment. (for real-time event)" }, "commentId": { "type": "string", "description": "ID of a comment." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "parentId": { "type": "string", "description": "ID of a parent comment." }, "rootId": { "type": "string", "description": "ID of a root comment." }, "referenceId": { "type": "string", "description": "ID of a reference." }, "referenceType": { "type": "string", "enum": [ "post", "content", "story" ], "description": "Type of a reference (post/content)." }, "dataType": { "type": "string", "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")." }, "dataTypes": { "type": "array", "description": "Types of a comment (a comment can contain multiple types)", "items": { "type": "string", "enum": [ "text", "image", "video" ] } }, "data": { "type": "object", "description": "Body of a comment." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "childrenNumber": { "type": "number" }, "flagCount": { "type": "integer", "description": "The number of users that has read this comment." }, "hashFlag": { "type": "object", "description": "The flag for checking internally that this comment is reported or not.", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "reactions": { "type": "object", "description": "The mapping of reaction with reactionCounter.", "example": { "like": 1 } }, "reactionsCount": { "type": "integer", "description": "The number of all reactions for this comment.", "example": 1 }, "myReactions": { "type": "array", "items": { "type": "string", "example": "like" }, "description": "The list of my reactions to this comment." }, "isDeleted": { "type": "boolean", "default": false, "description": "A flag to deleted a comment." }, "editedAt": { "type": "string", "description": "The date/time when comment is updated.", "format": "date-time" }, "createdAt": { "type": "string", "description": "The date/time when a comment is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a comment is updated or deleted.", "format": "date-time" }, "children": { "type": "array", "items": { "type": "string", "description": "ID of a children comment." } }, "segmentNumber": { "type": "integer", "example": 1 }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the comment.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "type: * `user` - need to specific userIds and notification mentions individual user\n", "enum": [ "user" ] }, "userIds": { "type": "array", "description": "Array of UserId.", "items": { "type": "string" } }, "userPublicIds": { "type": "array", "description": "Array of UserPublicId.", "items": { "type": "string" } }, "userInternalIds": { "type": "array", "description": "Array of UserInternalId.", "items": { "type": "string" } } } } }, "attachments": { "type": "array", "description": "The attachments/medias to be included in the comment", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image", "video" ] }, "fileId": { "type": "string" } }, "required": [ "type", "fileId" ] } }, "targetId": { "type": "string", "description": "ID of a comment target." }, "targetType": { "type": "string", "description": "Type of a comment target.", "enum": [ "community", "user", "content" ] } }, "required": [ "commentId" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } }, "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "communities": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a community. (for real-time event)" }, "path": { "type": "string", "description": "Path of a community. (for real-time event)" }, "communityId": { "type": "string", "description": "ID of a community." }, "channelId": { "type": "string", "description": "ID of a channel." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "displayName": { "type": "string", "description": "Community name for displaying." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "description": { "type": "string", "description": "Description of a community." }, "isOfficial": { "type": "boolean", "description": "Is this community official?" }, "isPublic": { "type": "boolean", "description": "Is this community public?" }, "onlyAdminCanPost": { "type": "boolean", "description": "Can post by admin only?" }, "tags": { "type": "array", "description": "List of tags. They will be used for searching.", "items": { "type": "string" } }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "postsCount": { "type": "integer", "description": "Number of posts in community." }, "membersCount": { "type": "integer", "description": "Number of members in community." }, "isJoined": { "type": "boolean", "description": "Is this community joined?" }, "categoryIds": { "type": "array", "items": { "type": "string", "description": "ID of a category." } }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community is updated or deleted.", "format": "date-time" }, "hasFlaggedComment": { "type": "boolean", "default": false, "description": "The flag for checking internally that comments inside post is reported or not." }, "hasFlaggedPost": { "type": "boolean", "default": false, "description": "The flag for checking internally that post inside community is reported or not." }, "needApprovalOnPostCreation": { "type": "boolean", "default": false, "description": "Determines that this community require an authorize user to review post before post is published" }, "moderatorMemberCount": { "type": "integer" }, "allowCommentInStory": { "type": "boolean", "default": true }, "isDiscoverable": { "type": "boolean", "default": false, "description": "* If true, this private community will be discoverable in the query response.\n* If false, this private community will not appear in the list but can still be accessed via its ID.\n" }, "requiresJoinApproval": { "type": "boolean", "default": false, "description": "* If true, users will need to be approved by an admin before they can join the community.\n* If false, users can join the community without approval.\n" }, "notificationMode": { "type": "string", "enum": [ "default", "silent", "subscribe" ], "description": "Notification Mode:\n * `default` - Auto register push notification.\n * `silent` - Do not send notification.\n * `subscribe` - Send notification to subscribed users only.\n" }, "type": { "type": "string", "enum": [ "default", "event" ], "description": "Type of the community." } }, "required": [ "communityId", "channelId", "displayName" ] } }, "communityUsers": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string", "description": "ID of a user." }, "userPublicId": { "type": "string", "description": "Public ID of a user." }, "userInternalId": { "type": "string", "description": "Internal ID of a user." }, "channelId": { "type": "string", "description": "ID of a channel." }, "communityId": { "type": "string", "description": "ID of a community." }, "communityMembership": { "type": "string", "enum": [ "none", "member", "banned" ] }, "notMemberReason": { "type": "string", "description": "Reason why a user is not a member of the community." }, "isBanned": { "type": "boolean", "default": false }, "lastActivity": { "type": "string", "format": "date-time", "description": "The date/time when a user last did something related to the community such as add/remove members ." }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "lastJoin": { "type": "string", "format": "date-time", "description": "The date/time when a user last joined the community." }, "createdAt": { "type": "string", "description": "The date/time when a community user is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community user is updated or deleted.", "format": "date-time" } } } }, "categories": { "type": "array", "items": { "type": "object", "properties": { "categoryId": { "type": "string", "description": "ID of a community category." }, "name": { "type": "string", "description": "Community category name for displaying." }, "metadata": { "type": "object", "description": "Additional properties to support custom fields." }, "avatarFileId": { "type": "string", "description": "ID of a avatar file." }, "isDeleted": { "type": "boolean", "default": false, "description": "Is this community category deleted?" }, "createdAt": { "type": "string", "description": "The date/time when a community category is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a community category is updated or deleted.", "format": "date-time" } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "reactor": { "type": "object", "properties": { "reactionName": { "type": "string", "description": "Name of reaction such as 'like', 'love' and 'wow'." }, "userId": { "type": "string", "description": "ID of a creator." }, "userPublicIdId": { "type": "string", "description": "Public ID of a creator." }, "userInternalId": { "type": "string", "description": "Internal ID of a creator." }, "reactionId": { "type": "string", "description": "ID of a reaction." }, "createdAt": { "type": "string", "description": "The date/time when a reaction is created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a reaction is updated.", "format": "date-time" } } } } } } } ] }, "schema_User": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "The user ID." }, "data": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string", "description": "Private ID of a user. (for real-time event)" }, "path": { "type": "string", "description": "Path of a user. (for real-time event)" }, "userId": { "type": "string" }, "userInternalId": { "type": "string" }, "userPublicId": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "MUTE_CHANNEL", "CLOSE_CHANNEL", "EDIT_CHANNEL", "EDIT_CHANNEL_RATELIMIT", "EDIT_MESSAGE", "DELETE_MESSAGE", "BAN_USER_FROM_CHANNEL", "MUTE_USER_INSIDE_CHANNEL", "ADD_CHANNEL_USER", "REMOVE_CHANNEL_USER", "EDIT_CHANNEL_USER", "ASSIGN_CHANNEL_USER_ROLE", "BAN_USER", "EDIT_USER", "ASSIGN_USER_ROLE", "EDIT_USER_FEED_POST", "DELETE_USER_FEED_POST", "EDIT_USER_FEED_COMMENT", "DELETE_USER_FEED_COMMENT", "ADD_COMMUNITY_USER", "REMOVE_COMMUNITY_USER", "EDIT_COMMUNITY_USER", "BAN_COMMUNITY_USER", "MUTE_COMMUNITY_USER", "EDIT_COMMUNITY", "DELETE_COMMUNITY", "EDIT_COMMUNITY_POST", "DELETE_COMMUNITY_POST", "PIN_COMMUNITY_POST", "EDIT_COMMUNITY_COMMENT", "DELETE_COMMUNITY_COMMENT", "ASSIGN_COMMUNITY_USER_ROLE", "CREATE_COMMUNITY_CATEGORY", "EDIT_COMMUNITY_CATEGORY", "DELETE_COMMUNITY_CATEGORY", "CREATE_ROLE", "EDIT_ROLE", "DELETE_ROLE", "MANAGE_COMMUNITY_STORY" ] } }, "displayName": { "type": "string" }, "profileHandle": { "type": "string" }, "description": { "type": "string" }, "avatarFileId": { "type": "string" }, "avatarCustomUrl": { "type": "string" }, "flagCount": { "type": "integer" }, "hashFlag": { "type": "object", "properties": { "bits": { "type": "integer" }, "hashes": { "type": "integer" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "metadata": { "type": "object" }, "isGlobalBan": { "type": "boolean", "description": "Global ban status. Every user can see this flag." }, "isBrand": { "type": "boolean", "description": "Brand user status." }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "isDeleted": { "type": "boolean" } }, "required": [ "userId", "createdAt", "updatedAt" ] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "Root file key on cloud storage." }, "fileUrl": { "type": "string", "description": "Http link for download file" }, "type": { "type": "string", "description": "File type.", "enum": [ "image", "file", "video" ] }, "accessType": { "type": "string", "description": "File access type. `network` type requires authentication to download.", "enum": [ "public", "network" ], "default": "public" }, "altText": { "type": "string", "description": "Alternative text for the file.", "maxLength": 180 }, "createdAt": { "type": "string", "description": "The date/time when a file is uploaded.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date/time when a file is updated.", "format": "date-time" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "File name." }, "extension": { "type": "string", "description": "File format." }, "size": { "type": "number", "description": "File size." }, "mimeType": { "type": "string", "description": "File mime-type." }, "metadata": { "type": "object", "description": "File image metadata (width, height etc.).", "properties": { "exif": { "type": "object" }, "gps": { "type": "object" }, "height": { "type": "number" }, "width": { "type": "number" }, "isFull": { "type": "boolean" } } } } } } } } } } } }, { "type": "object", "properties": { "networkId": { "type": "string", "description": "ID of the network." }, "path": { "type": "string", "description": "A topic path for subscription." }, "eventType": { "type": "string", "description": "Name of the event." }, "senderId": { "type": "string", "description": "ID of sender node." }, "sendTime": { "type": "string", "description": "The date/time when event was sent.", "format": "date-time" }, "version": { "type": "string", "description": "Version of API" } } } ] } } } }