diff --git a/bundled.json b/bundled.json
index 7b55a92c..c4ad2e93 100644
--- a/bundled.json
+++ b/bundled.json
@@ -26536,154 +26536,370 @@
}
}
},
- "/api/v3/communities": {
- "get": {
- "summary": "query communities.",
+ "/api/v4/comments/{commentId}/checks": {
+ "post": {
+ "summary": "Add check note to comment",
"tags": [
- "Community"
+ "Comment"
],
"security": [
{
"BearerAuth": []
}
],
- "description": "query communities.\n",
+ "description": "Add a check note to a comment for content review purposes. Admin only.\n\n**Check Actions:**\n- `check`: Mark the comment as checked/reviewed\n- `need-follow-up`: Mark the comment as needing follow-up review\n- `add-note`: Add a note without changing the check status (maximum 5 notes, not included note on check or need-follow-up)\n\n**Check Status Updates:**\n- When action is `check`, checkStatus becomes `checked`\n- When action is `need-follow-up`, checkStatus becomes `follow-up-needed`\n- When action is `add-note`, checkStatus remains unchanged\n\n**Access Control:**\n- Admin only with ManagePostAndComment permission\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",
+ "name": "commentId",
+ "in": "path",
+ "required": true,
"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
+ "pattern": "^[0-9a-fA-F]{24}$"
},
- "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
- }
+ "description": "MongoDB ObjectId of the comment"
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "action"
+ ],
+ "properties": {
+ "action": {
+ "type": "string",
+ "enum": [
+ "check",
+ "need-follow-up",
+ "add-note"
+ ],
+ "description": "Action to take on the content:\n- `check`: Mark content as checked\n- `need-follow-up`: Mark content as needing follow-up\n- `add-note`: Add a note without changing status\n"
+ },
+ "note": {
+ "type": "string",
+ "maxLength": 250,
+ "description": "Optional note text (max 250 characters)"
+ }
+ }
+ }
+ }
+ }
+ },
"responses": {
"200": {
- "description": "Community Users Information",
+ "description": "Serialized comments",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "communities": {
+ "comments": {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "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"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "checkNotes": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "noteId": {
+ "type": "string",
+ "description": "Unique identifier for the check note"
+ },
+ "userId": {
+ "type": "string",
+ "description": "ID of the admin who created the note"
+ },
+ "action": {
+ "type": "string",
+ "enum": [
+ "check",
+ "need-follow-up",
+ "add-note"
+ ],
+ "description": "Action type of the check note"
+ },
+ "note": {
+ "type": "string",
+ "maxLength": 250,
+ "description": "Optional note text (max 250 characters)"
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "When the check note was created"
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "When the check note was last updated"
+ }
+ }
+ }
+ },
+ "checkStatus": {
+ "type": "string",
+ "enum": [
+ "to-check",
+ "follow-up-needed",
+ "checked"
+ ],
+ "description": "Current check status of the content"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "commentChildren": {
"type": "array",
"items": {
"type": "object",
"properties": {
"_id": {
"type": "string",
- "description": "Private ID of a community. (for real-time event)"
+ "description": "Private ID of a comment. (for real-time event)"
},
"path": {
"type": "string",
- "description": "Path of a community. (for real-time event)"
- },
- "communityId": {
- "type": "string",
- "description": "ID of a community."
+ "description": "Path of a comment. (for real-time event)"
},
- "channelId": {
+ "commentId": {
"type": "string",
- "description": "ID of a channel."
+ "description": "ID of a comment."
},
"userId": {
"type": "string",
@@ -26697,121 +26913,203 @@
"type": "string",
"description": "Internal ID of a creator."
},
- "displayName": {
+ "parentId": {
"type": "string",
- "description": "Community name for displaying."
+ "description": "ID of a parent comment."
},
- "avatarFileId": {
+ "rootId": {
"type": "string",
- "description": "ID of a avatar file."
+ "description": "ID of a root comment."
},
- "description": {
+ "referenceId": {
"type": "string",
- "description": "Description of a community."
- },
- "isOfficial": {
- "type": "boolean",
- "description": "Is this community official?"
+ "description": "ID of a reference."
},
- "isPublic": {
- "type": "boolean",
- "description": "Is this community public?"
+ "referenceType": {
+ "type": "string",
+ "enum": [
+ "post",
+ "content",
+ "story"
+ ],
+ "description": "Type of a reference (post/content)."
},
- "onlyAdminCanPost": {
- "type": "boolean",
- "description": "Can post by admin only?"
+ "dataType": {
+ "type": "string",
+ "description": "Type of a comment (deprecated in new SDK version, will be fixed as \"text\")."
},
- "tags": {
+ "dataTypes": {
"type": "array",
- "description": "List of tags. They will be used for searching.",
+ "description": "Types of a comment (a comment can contain multiple types)",
"items": {
- "type": "string"
+ "type": "string",
+ "enum": [
+ "text",
+ "image",
+ "video"
+ ]
}
},
+ "data": {
+ "type": "object",
+ "description": "Body of a comment."
+ },
"metadata": {
"type": "object",
"description": "Additional properties to support custom fields."
},
- "postsCount": {
- "type": "integer",
- "description": "Number of posts in community."
+ "childrenNumber": {
+ "type": "number"
},
- "membersCount": {
+ "flagCount": {
"type": "integer",
- "description": "Number of members in community."
+ "description": "The number of users that has read this comment."
},
- "isJoined": {
- "type": "boolean",
- "description": "Is this community joined?"
+ "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"
+ }
+ }
+ }
},
- "categoryIds": {
+ "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",
- "description": "ID of a category."
- }
+ "example": "like"
+ },
+ "description": "The list of my reactions to this comment."
},
"isDeleted": {
"type": "boolean",
"default": false,
- "description": "Is this community deleted?"
+ "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 community is created.",
+ "description": "The date/time when a comment is created.",
"format": "date-time"
},
"updatedAt": {
"type": "string",
- "description": "The date/time when a community is updated or deleted.",
+ "description": "The date/time when a comment 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"
+ "children": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "description": "ID of a children comment."
+ }
},
- "moderatorMemberCount": {
- "type": "integer"
+ "segmentNumber": {
+ "type": "integer",
+ "example": 1
},
- "allowCommentInStory": {
- "type": "boolean",
- "default": true
+ "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"
+ }
+ }
+ }
+ }
},
- "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"
+ "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"
+ ]
+ }
},
- "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"
+ "targetId": {
+ "type": "string",
+ "description": "ID of a comment target."
},
- "notificationMode": {
+ "targetType": {
"type": "string",
+ "description": "Type of a comment target.",
"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"
+ "community",
+ "user",
+ "content"
+ ]
}
},
"required": [
- "communityId",
- "channelId",
- "displayName"
+ "commentId"
]
}
},
@@ -26927,97 +27225,6 @@
}
}
},
- "files": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fileId": {
- "type": "string",
- "description": "Root file key on cloud storage."
- },
- "fileUrl": {
- "type": "string",
- "description": "Http link for download file"
- },
- "type": {
- "type": "string",
- "description": "File type.",
- "enum": [
- "image",
- "file",
- "video"
- ]
- },
- "accessType": {
- "type": "string",
- "description": "File access type. `network` type requires authentication to download.",
- "enum": [
- "public",
- "network"
- ],
- "default": "public"
- },
- "altText": {
- "type": "string",
- "description": "Alternative text for the file.",
- "maxLength": 180
- },
- "createdAt": {
- "type": "string",
- "description": "The date/time when a file is uploaded.",
- "format": "date-time"
- },
- "updatedAt": {
- "type": "string",
- "description": "The date/time when a file is updated.",
- "format": "date-time"
- },
- "attributes": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "File name."
- },
- "extension": {
- "type": "string",
- "description": "File format."
- },
- "size": {
- "type": "number",
- "description": "File size."
- },
- "mimeType": {
- "type": "string",
- "description": "File mime-type."
- },
- "metadata": {
- "type": "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": {
@@ -27158,88 +27365,134 @@
]
}
},
- "categories": {
+ "roles": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "categoryId": {
- "type": "string",
- "description": "ID of a community category."
- },
- "name": {
- "type": "string",
- "description": "Community category name for displaying."
+ "roleId": {
+ "type": "string"
},
- "metadata": {
- "type": "object",
- "description": "Additional properties to support custom fields."
+ "displayName": {
+ "type": "string"
},
- "avatarFileId": {
+ "updatedAt": {
"type": "string",
- "description": "ID of a avatar file."
- },
- "isDeleted": {
- "type": "boolean",
- "default": false,
- "description": "Is this community category deleted?"
+ "description": "The date/time when a role is updated or deleted.",
+ "format": "date-time"
},
"createdAt": {
"type": "string",
- "description": "The date/time when a community category is created.",
+ "description": "The date/time when a role is created.",
"format": "date-time"
},
- "updatedAt": {
- "type": "string",
- "description": "The date/time when a community category is updated or deleted.",
- "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"
+ ]
}
},
- "feeds": {
+ "files": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "targetId": {
+ "fileId": {
"type": "string",
- "description": "Target public id (community id or user id)"
+ "description": "Root file key on cloud storage."
},
- "targetType": {
+ "fileUrl": {
"type": "string",
- "description": "Target that feed belong to",
+ "description": "Http link for download file"
+ },
+ "type": {
+ "type": "string",
+ "description": "File type.",
"enum": [
- "community",
- "user"
+ "image",
+ "file",
+ "video"
]
},
- "postCount": {
- "type": "number",
- "description": "Post count in feed"
- },
- "feedType": {
+ "accessType": {
"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",
+ "description": "File access type. `network` type requires authentication to download.",
"enum": [
- "published",
- "reviewing",
- "declined"
- ]
+ "public",
+ "network"
+ ],
+ "default": "public"
},
- "feedId": {
+ "altText": {
"type": "string",
- "description": "Feed public id"
+ "description": "Alternative text for the file.",
+ "maxLength": 180
},
"createdAt": {
"type": "string",
- "description": "The date/time when a feed is created.",
+ "description": "The date/time when a file is uploaded.",
"format": "date-time"
},
"updatedAt": {
"type": "string",
- "description": "The date/time when a feed is updated.",
+ "description": "The date/time when a file is updated.",
"format": "date-time"
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "File name."
+ },
+ "extension": {
+ "type": "string",
+ "description": "File format."
+ },
+ "size": {
+ "type": "number",
+ "description": "File size."
+ },
+ "mimeType": {
+ "type": "string",
+ "description": "File mime-type."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "File image metadata (width, height etc.).",
+ "properties": {
+ "exif": {
+ "type": "object"
+ },
+ "gps": {
+ "type": "object"
+ },
+ "height": {
+ "type": "number"
+ },
+ "width": {
+ "type": "number"
+ },
+ "isFull": {
+ "type": "boolean"
+ }
+ }
+ }
+ }
}
}
}
@@ -27260,6 +27513,50 @@
}
}
},
+ "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": {
@@ -27304,8 +27601,8 @@
}
}
},
- "429": {
- "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.",
+ "404": {
+ "description": "Resource Not Found error.",
"content": {
"application/json": {
"schema": {
@@ -27342,8 +27639,8 @@
},
"example": {
"status": "error",
- "code": 400311,
- "message": "RateLimit Exceed."
+ "code": 400400,
+ "message": "Resource Not Found."
}
}
}
@@ -27393,127 +27690,317 @@
}
}
}
- },
- "post": {
- "summary": "create a community.",
+ }
+ },
+ "/api/v4/comments/{commentId}/checks/{noteId}": {
+ "delete": {
+ "summary": "Delete check note from comment",
"tags": [
- "Community"
+ "Comment"
],
"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
+ "description": "Delete a specific check note from a comment. Admin only.\n\n**Important Notes:**\n- Soft deletes the check note (marks as deleted)\n- Does not affect the comment's check status\n- Admin only with ManagePostAndComment permission\n",
+ "parameters": [
+ {
+ "name": "commentId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]{24}$"
+ },
+ "description": "MongoDB ObjectId of the comment"
+ },
+ {
+ "name": "noteId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]{24}$"
+ },
+ "description": "MongoDB ObjectId of the check note"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Check note 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"
+ }
+ ]
+ }
+ }
}
- },
- "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"
- ]
+ "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/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": "Communities Information",
+ "description": "Community Users Information",
"content": {
"application/json": {
"schema": {
@@ -28013,47 +28500,6 @@
]
}
},
- "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": {
@@ -28139,6 +28585,17 @@
}
}
}
+ },
+ "paging": {
+ "type": "object",
+ "properties": {
+ "next": {
+ "type": "string"
+ },
+ "previous": {
+ "type": "string"
+ }
+ }
}
}
}
@@ -28146,32 +28603,7 @@
}
},
"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.",
+ "description": "No permission to access this resource.",
"content": {
"application/json": {
"schema": {
@@ -28208,8 +28640,8 @@
},
"example": {
"status": "error",
- "code": 400400,
- "message": "Resource Not Found."
+ "code": 400300,
+ "message": "Forbidden error."
}
}
}
@@ -28303,11 +28735,9 @@
}
}
}
- }
- },
- "/api/v3/communities/{communityId}": {
- "get": {
- "summary": "get a community by ID.",
+ },
+ "post": {
+ "summary": "create a community.",
"tags": [
"Community"
],
@@ -28316,32 +28746,113 @@
"BearerAuth": []
}
],
- "description": "Get a community by ID\n",
- "parameters": [
- {
- "name": "communityId",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1,
- "maxLength": 900
+ "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"
+ ]
+ }
}
- },
- {
- "name": "type",
- "in": "query",
- "schema": {
- "type": "string",
- "enum": [
- "public",
- "internal"
- ],
- "default": "public"
- },
- "description": "type of communityId"
}
- ],
+ },
"responses": {
"200": {
"description": "Communities Information",
@@ -28976,96 +29487,121 @@
}
}
},
- "404": {
- "description": "Resource Not Found error.",
+ "403": {
+ "description": "Error Response",
"content": {
"application/json": {
- "schema": {
- "type": "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": {
+ "ForbiddenError": {
+ "summary": "No permission to access this resource.",
+ "value": {
+ "status": "error",
+ "code": 400300,
+ "message": "Forbidden error."
}
- }
- },
- "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"
- }
- ]
- }
- }
+ },
+ "DuplicateEntryError": {
+ "summary": "Data already exists",
+ "value": {
+ "status": "error",
+ "code": 400315,
+ "message": "Data already exists"
}
}
- },
- "example": {
- "status": "error",
- "code": 400311,
- "message": "RateLimit Exceed."
}
}
}
},
- "500": {
- "description": "Unexpected 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": {
@@ -29109,9 +29645,11 @@
}
}
}
- },
- "put": {
- "summary": "update a community.",
+ }
+ },
+ "/api/v3/communities/{communityId}": {
+ "get": {
+ "summary": "get a community by ID.",
"tags": [
"Community"
],
@@ -29120,6 +29658,7 @@
"BearerAuth": []
}
],
+ "description": "Get a community by ID\n",
"parameters": [
{
"name": "communityId",
@@ -29130,107 +29669,21 @@
"minLength": 1,
"maxLength": 900
}
+ },
+ {
+ "name": "type",
+ "in": "query",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "public",
+ "internal"
+ ],
+ "default": "public"
+ },
+ "description": "type of communityId"
}
],
- "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",
@@ -29865,77 +30318,52 @@
}
}
},
- "403": {
- "description": "Error Response",
+ "404": {
+ "description": "Resource Not Found error.",
"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"
+ "schema": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "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."
}
}
}
},
- "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.",
+ "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": {
@@ -30024,8 +30452,8 @@
}
}
},
- "delete": {
- "summary": "delete a community.",
+ "put": {
+ "summary": "update a community.",
"tags": [
"Community"
],
@@ -30046,229 +30474,105 @@
}
}
],
- "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"
- }
- ]
- }
- }
+ "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
}
- }
- },
- "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"
- }
- ]
- }
- }
+ },
+ "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"
}
},
- "example": {
- "status": "error",
- "code": 500000,
- "message": "Unexpected error"
- }
+ "required": [
+ "communityId"
+ ]
}
}
}
- }
- }
- },
- "/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",
@@ -30904,7 +31208,32 @@
}
},
"403": {
- "description": "User is banned from a channel / community.",
+ "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": {
@@ -30941,8 +31270,183 @@
},
"example": {
"status": "error",
- "code": 400304,
- "message": "User is banned from a channel / community."
+ "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"
}
}
}
@@ -31082,9 +31586,9 @@
}
}
},
- "/api/v3/communities/{communityId}/leave": {
- "delete": {
- "summary": "Leave a community.",
+ "/api/v3/communities/{communityId}/join": {
+ "post": {
+ "summary": "Join a community",
"tags": [
"Community"
],
@@ -31093,7 +31597,8 @@
"BearerAuth": []
}
],
- "description": "Leave community by ID\n",
+ "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",
@@ -31740,50 +32245,6 @@
}
}
},
- "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": {
@@ -31963,9 +32424,9 @@
}
}
},
- "/api/v3/communities/{communityId}/users": {
- "get": {
- "summary": "Query Community Users",
+ "/api/v3/communities/{communityId}/leave": {
+ "delete": {
+ "summary": "Leave a community.",
"tags": [
"Community"
],
@@ -31974,7 +32435,7 @@
"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",
+ "description": "Leave community by ID\n",
"parameters": [
{
"name": "communityId",
@@ -31985,156 +32446,11 @@
"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"
- ],
- "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",
+ "description": "Communities Information",
"content": {
"application/json": {
"schema": {
@@ -32634,6 +32950,47 @@
]
}
},
+ "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": {
@@ -32719,25 +33076,58 @@
}
}
}
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string"
},
- "paging": {
+ "code": {
+ "type": "number"
+ },
+ "message": {
+ "type": "string"
+ },
+ "data": {
"type": "object",
"properties": {
- "next": {
- "type": "string"
- },
- "previous": {
- "type": "string"
+ "detail": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "object"
+ }
+ ]
}
}
}
}
+ },
+ "example": {
+ "status": "error",
+ "code": 400100,
+ "message": "Unauthorized"
}
}
}
},
- "404": {
- "description": "Resource Not Found error.",
+ "403": {
+ "description": "User is banned from a channel / community.",
"content": {
"application/json": {
"schema": {
@@ -32774,14 +33164,14 @@
},
"example": {
"status": "error",
- "code": 400400,
- "message": "Resource Not Found."
+ "code": 400304,
+ "message": "User is banned from a channel / community."
}
}
}
},
- "429": {
- "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.",
+ "404": {
+ "description": "Resource Not Found error.",
"content": {
"application/json": {
"schema": {
@@ -32818,14 +33208,58 @@
},
"example": {
"status": "error",
- "code": 400311,
- "message": "RateLimit Exceed."
+ "code": 400400,
+ "message": "Resource Not Found."
}
}
}
},
- "500": {
- "description": "Unexpected 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": {
@@ -32869,9 +33303,11 @@
}
}
}
- },
- "post": {
- "summary": "add community users",
+ }
+ },
+ "/api/v3/communities/{communityId}/users": {
+ "get": {
+ "summary": "Query Community Users",
"tags": [
"Community"
],
@@ -32880,8 +33316,7 @@
"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",
+ "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",
@@ -32892,37 +33327,156 @@
"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"
+ },
+ {
+ "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"
+ ],
+ "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": "Communities Information",
+ "description": "Community Users Information",
"content": {
"application/json": {
"schema": {
@@ -33422,47 +33976,6 @@
]
}
},
- "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": {
@@ -33548,31 +34061,17 @@
}
}
}
- }
- }
- }
- }
- }
- },
- "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."
+ },
+ "paging": {
+ "type": "object",
+ "properties": {
+ "next": {
+ "type": "string"
+ },
+ "previous": {
+ "type": "string"
+ }
+ }
}
}
}
@@ -33713,8 +34212,8 @@
}
}
},
- "delete": {
- "summary": "remove community users",
+ "post": {
+ "summary": "add community users",
"tags": [
"Community"
],
@@ -33723,7 +34222,8 @@
"BearerAuth": []
}
],
- "description": "remove community users\n",
+ "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",
@@ -33734,24 +34234,34 @@
"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"
}
],
+ "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",
@@ -34387,45 +34897,26 @@
}
},
"403": {
- "description": "Permission denied.",
+ "description": "Error Response",
"content": {
"application/json": {
- "schema": {
- "type": "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": {
+ "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."
}
}
- },
- "example": {
- "status": "error",
- "code": 400301,
- "message": "User is not a member of a channel"
}
}
}
@@ -34563,11 +35054,9 @@
}
}
}
- }
- },
- "/api/v3/communities/{communityId}/users/ban": {
- "put": {
- "summary": "ban community users",
+ },
+ "delete": {
+ "summary": "remove community users",
"tags": [
"Community"
],
@@ -34576,7 +35065,7 @@
"BearerAuth": []
}
],
- "description": "ban community users.\n",
+ "description": "remove community users\n",
"parameters": [
{
"name": "communityId",
@@ -34587,34 +35076,24 @@
"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"
- ]
+ },
+ {
+ "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",
@@ -35250,34 +35729,45 @@
}
},
"403": {
- "description": "Error Response",
+ "description": "Permission denied.",
"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."
+ "schema": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "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"
}
}
}
@@ -35417,9 +35907,9 @@
}
}
},
- "/api/v3/communities/{communityId}/users/unban": {
+ "/api/v3/communities/{communityId}/users/ban": {
"put": {
- "summary": "unban community users",
+ "summary": "ban community users",
"tags": [
"Community"
],
@@ -35428,7 +35918,7 @@
"BearerAuth": []
}
],
- "description": "unban community users.\n",
+ "description": "ban community users.\n",
"parameters": [
{
"name": "communityId",
@@ -36114,12 +36604,20 @@
"message": "User is not a member of a channel"
}
},
- "UserIsUnbannedError": {
- "summary": "User is unbanned from a channel / community.",
+ "ExemptFromBanError": {
+ "summary": "Some users cannot be banned",
"value": {
"status": "error",
- "code": 400316,
- "message": "User is unbanned from a channel / community."
+ "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."
}
}
}
@@ -36261,18 +36759,18 @@
}
}
},
- "/api/v3/communities/{communityId}/users/roles": {
- "post": {
- "summary": "Add role to community users",
+ "/api/v3/communities/{communityId}/users/unban": {
+ "put": {
+ "summary": "unban community users",
"tags": [
"Community"
],
"security": [
{
- "ApiKeyAuth": []
+ "BearerAuth": []
}
],
- "description": "Add role to community users.\n",
+ "description": "unban community users.\n",
"parameters": [
{
"name": "communityId",
@@ -36286,17 +36784,13 @@
}
],
"requestBody": {
+ "description": "condition for querying\n",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "role": {
- "type": "string",
- "minLength": 1,
- "maxLength": 100
- },
"userIds": {
"type": "array",
"minItems": 1,
@@ -36304,13 +36798,12 @@
"items": {
"type": "string",
"minLength": 1,
- "maxLength": 50
+ "maxLength": 900
}
}
},
"required": [
- "userIds",
- "role"
+ "userIds"
]
}
}
@@ -36955,20 +37448,20 @@
"content": {
"application/json": {
"examples": {
- "GenericPermissionDeniedError": {
+ "PermissionDeniedError": {
"summary": "Permission denied.",
"value": {
"status": "error",
"code": 400301,
- "message": "Permission denied"
+ "message": "User is not a member of a channel"
}
},
- "UserIsBannedError": {
- "summary": "User is banned from a channel / community.",
+ "UserIsUnbannedError": {
+ "summary": "User is unbanned from a channel / community.",
"value": {
"status": "error",
- "code": 400304,
- "message": "User is banned from a channel / community."
+ "code": 400316,
+ "message": "User is unbanned from a channel / community."
}
}
}
@@ -37108,18 +37601,20 @@
}
}
}
- },
- "delete": {
- "summary": "Remove role from community users",
+ }
+ },
+ "/api/v3/communities/{communityId}/users/roles": {
+ "post": {
+ "summary": "Add role to community users",
"tags": [
"Community"
],
"security": [
{
- "BearerAuth": []
+ "ApiKeyAuth": []
}
],
- "description": "Remove role from community users.\n",
+ "description": "Add role to community users.\n",
"parameters": [
{
"name": "communityId",
@@ -37130,34 +37625,39 @@
"minLength": 1,
"maxLength": 900
}
- },
- {
- "in": "query",
- "name": "userIds",
- "required": true,
- "schema": {
- "type": "array",
- "minItems": 1,
- "maxItems": 100,
- "items": {
- "type": "string",
- "minLength": 1,
- "maxLength": 50
+ }
+ ],
+ "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"
+ ]
}
- },
- "description": "list of user id"
- },
- {
- "in": "query",
- "name": "role",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1,
- "maxLength": 900
}
}
- ],
+ },
"responses": {
"200": {
"description": "Communities Information",
@@ -37950,11 +38450,9 @@
}
}
}
- }
- },
- "/api/v3/communities/{communityId}/permissions/me": {
- "get": {
- "summary": "Get self permission in community",
+ },
+ "delete": {
+ "summary": "Remove role from community users",
"tags": [
"Community"
],
@@ -37963,7 +38461,7 @@
"BearerAuth": []
}
],
- "description": "query comments.\n",
+ "description": "Remove role from community users.\n",
"parameters": [
{
"name": "communityId",
@@ -37974,224 +38472,10 @@
"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",
+ "name": "userIds",
"required": true,
"schema": {
"type": "array",
@@ -38199,22 +38483,21 @@
"maxItems": 100,
"items": {
"type": "string",
+ "minLength": 1,
"maxLength": 50
}
- }
+ },
+ "description": "list of user id"
},
{
- "name": "type",
"in": "query",
+ "name": "role",
+ "required": true,
"schema": {
"type": "string",
- "enum": [
- "public",
- "internal"
- ],
- "default": "public"
- },
- "description": "type of communityId"
+ "minLength": 1,
+ "maxLength": 900
+ }
}
],
"responses": {
@@ -38851,6 +39134,31 @@
}
}
},
+ "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": {
@@ -38986,9 +39294,9 @@
}
}
},
- "/api/v3/communities/recommended": {
+ "/api/v3/communities/{communityId}/permissions/me": {
"get": {
- "summary": "get list of recommended community",
+ "summary": "Get self permission in community",
"tags": [
"Community"
],
@@ -38997,39 +39305,258 @@
"BearerAuth": []
}
],
- "description": "Get list of recommended community\n",
+ "description": "query comments.\n",
"parameters": [
{
- "name": "Content-Type",
- "in": "header",
+ "name": "communityId",
+ "in": "path",
"required": true,
"schema": {
- "type": "string"
+ "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": [
{
- "name": "includeDiscoverablePrivateCommunity",
+ "BearerAuth": []
+ }
+ ],
+ "description": "Get list of community\n",
+ "parameters": [
+ {
+ "name": "communityIds",
"in": "query",
- "description": "If true, include discoverable private communities in the response. Default is false.",
+ "required": true,
"schema": {
- "type": "boolean"
+ "type": "array",
+ "minItems": 1,
+ "maxItems": 100,
+ "items": {
+ "type": "string",
+ "maxLength": 50
+ }
}
},
{
- "name": "options",
+ "name": "type",
"in": "query",
- "style": "deepObject",
"schema": {
- "type": "object",
- "properties": {
- "limit": {
- "type": "integer",
- "minimum": 1,
- "maximum": 100,
- "default": 5
- }
- }
- }
+ "type": "string",
+ "enum": [
+ "public",
+ "internal"
+ ],
+ "default": "public"
+ },
+ "description": "type of communityId"
}
],
"responses": {
@@ -39666,6 +40193,50 @@
}
}
},
+ "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": {
@@ -39757,9 +40328,9 @@
}
}
},
- "/api/v3/communities/top-trending": {
+ "/api/v3/communities/recommended": {
"get": {
- "summary": "get list of top trend community",
+ "summary": "get list of recommended community",
"tags": [
"Community"
],
@@ -39768,7 +40339,7 @@
"BearerAuth": []
}
],
- "description": "Get list of top trend community\n",
+ "description": "Get list of recommended community\n",
"parameters": [
{
"name": "Content-Type",
@@ -40528,9 +41099,9 @@
}
}
},
- "/api/v4/communities/{communityId}/users/roles": {
- "post": {
- "summary": "Add roles to community users",
+ "/api/v3/communities/top-trending": {
+ "get": {
+ "summary": "get list of top trend community",
"tags": [
"Community"
],
@@ -40539,56 +41110,41 @@
"BearerAuth": []
}
],
- "description": "Add roles to community users.\n",
+ "description": "Get list of top trend community\n",
"parameters": [
{
- "name": "communityId",
- "in": "path",
+ "name": "Content-Type",
+ "in": "header",
"required": true,
"schema": {
- "type": "string",
- "minLength": 1,
- "maxLength": 900
+ "type": "string"
}
- }
- ],
- "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"
- ]
+ },
+ {
+ "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",
@@ -41091,6 +41647,47 @@
]
}
},
+ "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": {
@@ -41176,166 +41773,14 @@
}
}
}
- },
- "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.",
+ "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": {
@@ -41423,35 +41868,21 @@
}
}
}
- },
- "delete": {
- "summary": "Remove roles from community users",
+ }
+ },
+ "/api/v4/communities/{communityId}/users/roles": {
+ "post": {
+ "summary": "Add roles to community users",
"tags": [
"Community"
],
"security": [
{
- "ApiKeyAuth": []
+ "BearerAuth": []
}
],
- "description": "Remove roles from community users.\n",
+ "description": "Add roles to 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",
@@ -41461,41 +41892,45 @@
"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"
}
],
+ "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",
@@ -42330,21 +42765,35 @@
}
}
}
- }
- },
- "/api/v4/communities/{communityId}/join": {
- "post": {
- "summary": "Join a community",
+ },
+ "delete": {
+ "summary": "Remove roles from community users",
"tags": [
"Community"
],
"security": [
{
- "BearerAuth": []
+ "ApiKeyAuth": []
}
],
- "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",
+ "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",
@@ -42354,120 +42803,1013 @@
"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": "Join Community Response",
+ "description": "Communities Information",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "joinRequests": {
+ "communities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"_id": {
"type": "string",
- "description": "Private ID of a join request."
- },
- "networkId": {
- "type": "string",
- "description": "ID of the network."
+ "description": "Private ID of a community. (for real-time event)"
},
- "targetId": {
+ "path": {
"type": "string",
- "description": "ID of the target entity (community)."
+ "description": "Path of a community. (for real-time event)"
},
- "targetType": {
+ "communityId": {
"type": "string",
- "description": "Type of the target entity."
+ "description": "ID of a community."
},
- "type": {
+ "channelId": {
"type": "string",
- "description": "Type of the request."
+ "description": "ID of a channel."
},
"userId": {
"type": "string",
- "description": "ID of the user making the request."
+ "description": "ID of a creator."
},
- "status": {
+ "userPublicId": {
"type": "string",
- "description": "Current status of the join request."
+ "description": "Public ID of a creator."
},
- "respondedAt": {
+ "userInternalId": {
"type": "string",
- "nullable": true,
- "format": "date-time",
- "description": "The date/time when the request was responded to (approved/rejected)."
+ "description": "Internal ID of a creator."
},
- "updatedAt": {
+ "displayName": {
"type": "string",
- "format": "date-time",
- "description": "The date/time when the join request was last updated."
+ "description": "Community name for displaying."
},
- "createdAt": {
+ "avatarFileId": {
"type": "string",
- "format": "date-time",
- "description": "The date/time when the join request was created."
+ "description": "ID of a avatar file."
},
- "joinRequestId": {
+ "description": {
"type": "string",
- "description": "Public ID of the join request."
+ "description": "Description of a community."
},
- "requestorId": {
- "type": "string",
- "description": "Public ID of the user who made the request."
+ "isOfficial": {
+ "type": "boolean",
+ "description": "Is this community official?"
},
- "requestorPublicId": {
- "type": "string",
- "description": "Public ID of the requestor."
+ "isPublic": {
+ "type": "boolean",
+ "description": "Is this community public?"
},
- "requestorInternalId": {
- "type": "string",
- "description": "Internal ID of the requestor."
+ "onlyAdminCanPost": {
+ "type": "boolean",
+ "description": "Can post by admin only?"
},
- "responderId": {
+ "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",
- "nullable": true,
- "description": "ID of the user who responded to the request."
+ "description": "The date/time when a community is created.",
+ "format": "date-time"
},
- "responderPublicId": {
+ "updatedAt": {
"type": "string",
- "nullable": true,
- "description": "Public ID of the responder."
+ "description": "The date/time when a community is updated or deleted.",
+ "format": "date-time"
},
- "responderInternalId": {
+ "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",
- "nullable": true,
- "description": "Internal ID of the responder."
+ "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"
}
- }
+ },
+ "required": [
+ "communityId",
+ "channelId",
+ "displayName"
+ ]
}
},
- "users": {
+ "communityUsers": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "_id": {
+ "userId": {
"type": "string",
- "description": "Private ID of a user. (for real-time event)"
+ "description": "ID of a user."
},
- "path": {
+ "userPublicId": {
"type": "string",
- "description": "Path of a user. (for real-time event)"
- },
- "userId": {
- "type": "string"
+ "description": "Public ID of a user."
},
"userInternalId": {
- "type": "string"
+ "type": "string",
+ "description": "Internal ID of a user."
},
- "userPublicId": {
- "type": "string"
+ "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"
+ ]
+ }
+ },
+ "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",
@@ -168588,65 +169930,4265 @@
}
}
},
+ "/api/v5/posts/{postId}/checks": {
+ "post": {
+ "summary": "Add check note to post",
+ "tags": [
+ "Post"
+ ],
+ "security": [
+ {
+ "BearerAuth": []
+ }
+ ],
+ "description": "Add a check note to a post for content review purposes. Admin only.\n\n**Check Actions:**\n- `check`: Mark the post as checked/reviewed\n- `need-follow-up`: Mark the post as needing follow-up review\n- `add-note`: Add a note without changing the check status (maximum 5 notes, not included note on check or need-follow-up)\n\n**Check Status Updates:**\n- When action is `check`, checkStatus becomes `checked`\n- When action is `need-follow-up`, checkStatus becomes `follow-up-needed`\n- When action is `add-note`, checkStatus remains unchanged\n\n**Access Control:**\n- Admin only with ManagePostAndComment permission\n",
+ "parameters": [
+ {
+ "name": "postId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]{24}$"
+ },
+ "description": "MongoDB ObjectId of the post"
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "action"
+ ],
+ "properties": {
+ "action": {
+ "type": "string",
+ "enum": [
+ "check",
+ "need-follow-up",
+ "add-note"
+ ],
+ "description": "Action to take on the content:\n- `check`: Mark content as checked\n- `need-follow-up`: Mark content as needing follow-up\n- `add-note`: Add a note without changing status\n"
+ },
+ "note": {
+ "type": "string",
+ "maxLength": 250,
+ "description": "Optional note text (max 250 characters)"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Post Information",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "posts": {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "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",
+ "example": "text"
+ }
+ },
+ "required": [
+ "postId",
+ "data"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "checkNote": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "noteId": {
+ "type": "string",
+ "description": "Unique identifier for the check note"
+ },
+ "userId": {
+ "type": "string",
+ "description": "ID of the admin who created the note"
+ },
+ "action": {
+ "type": "string",
+ "enum": [
+ "check",
+ "need-follow-up",
+ "add-note"
+ ],
+ "description": "Action type of the check note"
+ },
+ "note": {
+ "type": "string",
+ "maxLength": 250,
+ "description": "Optional note text (max 250 characters)"
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "When the check note was created"
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "When the check note was last updated"
+ }
+ }
+ }
+ },
+ "checkStatus": {
+ "type": "string",
+ "enum": [
+ "to-check",
+ "follow-up-needed",
+ "checked"
+ ],
+ "description": "Current check status of the content"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "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"
+ }
+ },
+ "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"
+ ]
+ }
+ },
+ "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": []
+ }
+ }
+ }
+ },
+ "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."
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Unexpected error.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string"
+ },
+ "code": {
+ "type": "number"
+ },
+ "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/{postId}/checks/{noteId}": {
+ "delete": {
+ "summary": "Delete check note from post",
+ "tags": [
+ "Post"
+ ],
+ "security": [
+ {
+ "BearerAuth": []
+ }
+ ],
+ "description": "Delete a specific check note from a post. Admin only.\n\n**Important Notes:**\n- Soft deletes the check note (marks as deleted)\n- Does not affect the post's check status\n- Admin only with ManagePostAndComment permission\n",
+ "parameters": [
+ {
+ "name": "postId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]{24}$"
+ },
+ "description": "MongoDB ObjectId of the post"
+ },
+ {
+ "name": "noteId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]{24}$"
+ },
+ "description": "MongoDB ObjectId of the check note"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Check note 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."
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Unexpected error.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string"
+ },
+ "code": {
+ "type": "number"
+ },
+ "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",
+ "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 presence feature setting response",
+ "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": {
- "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"
- ]
+ "status": {
+ "type": "string"
},
- "network": {
- "description": "Presence network setting without enabled",
+ "code": {
+ "type": "number"
+ },
+ "message": {
+ "type": "string"
+ },
+ "data": {
"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"
+ "detail": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "object"
+ }
+ ]
}
- },
- "required": [
- "heartbeatInterval",
- "presenceSyncInterval"
- ]
+ }
}
}
+ },
+ "example": {
+ "status": "error",
+ "code": 400400,
+ "message": "Resource Not Found."
}
}
}
@@ -168695,33 +174237,53 @@
}
}
}
- },
+ }
+ },
+ "post": {
+ "summary": "add reaction to any document.",
+ "tags": [
+ "Reaction"
+ ],
"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"
],
+ "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": {
- "enabled": {
- "type": "boolean"
+ "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": [
- "enabled"
+ "referenceId",
+ "referenceType",
+ "reactionName"
]
}
}
@@ -168729,30 +174291,22 @@
},
"responses": {
"200": {
- "description": "Update presence user setting response",
+ "description": "Returns a reaction id is added",
"content": {
"application/json": {
"schema": {
- "description": "Presence user setting",
"type": "object",
"properties": {
- "enabled": {
- "type": "boolean"
- },
- "enabledAt": {
- "type": "string",
- "format": "date-time"
+ "addedId": {
+ "type": "string"
}
- },
- "required": [
- "enabled"
- ]
+ }
}
}
}
},
- "403": {
- "description": "No permission to access this resource.",
+ "404": {
+ "description": "Resource Not Found error.",
"content": {
"application/json": {
"schema": {
@@ -168789,8 +174343,8 @@
},
"example": {
"status": "error",
- "code": 400300,
- "message": "Forbidden error."
+ "code": 400400,
+ "message": "Resource Not Found."
}
}
}
@@ -168839,81 +174393,81 @@
}
}
}
- },
- "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",
+ }
+ },
+ "delete": {
+ "summary": "remove reaction from any document.",
"tags": [
- "Presence"
+ "Reaction"
],
"security": [
{
"BearerAuth": []
}
],
+ "description": "Remove reaction from a document referenced by ID and type.\n",
"parameters": [
{
- "name": "userIds",
+ "name": "referenceId",
+ "description": "Reference id",
"in": "query",
"required": true,
"schema": {
- "type": "array",
- "description": "A list of user ID",
- "maxItems": 220,
- "items": {
- "type": "string",
- "maxLength": 300
- },
- "example": [
- "yama69",
- "yama420"
+ "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": "Get user presence list response",
+ "description": "Returns a reaction id is removed",
"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"
- ]
- }
+ "removedId": {
+ "type": "string"
}
}
}
}
}
},
- "403": {
- "description": "No permission to access this resource.",
+ "404": {
+ "description": "Resource Not Found error.",
"content": {
"application/json": {
"schema": {
@@ -168950,8 +174504,8 @@
},
"example": {
"status": "error",
- "code": 400300,
- "message": "Forbidden error."
+ "code": 400400,
+ "message": "Resource Not Found."
}
}
}
@@ -169003,61 +174557,648 @@
}
}
},
- "/api/v1/presence/network/users": {
+ "/api/v3/reactions": {
"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",
+ "summary": "get list of reactions.",
"tags": [
- "Presence"
+ "Reaction"
+ ],
+ "security": [
+ {
+ "BearerAuth": []
+ }
],
+ "description": "Get paginable list of reactions.\n",
"parameters": [
{
- "name": "orderBy",
+ "name": "referenceId",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "maxLength": 900
+ }
+ },
+ {
+ "name": "referenceType",
"in": "query",
+ "required": true,
"schema": {
"type": "string",
"enum": [
- "asc",
- "desc"
+ "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": "Get online users presence response",
+ "description": "Reaction information.",
"content": {
"application/json": {
"schema": {
- "description": "List of user presence",
"type": "object",
"properties": {
- "presences": {
+ "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": {
- "description": "Presence Object",
"type": "object",
"properties": {
+ "_id": {
+ "type": "string",
+ "description": "Private ID of a user. (for real-time event)"
+ },
+ "path": {
+ "type": "string",
+ "description": "Path of a user. (for real-time event)"
+ },
"userId": {
"type": "string"
},
- "lastHeartbeat": {
+ "userInternalId": {
+ "type": "string"
+ },
+ "userPublicId": {
+ "type": "string"
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "permissions": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "MUTE_CHANNEL",
+ "CLOSE_CHANNEL",
+ "EDIT_CHANNEL",
+ "EDIT_CHANNEL_RATELIMIT",
+ "EDIT_MESSAGE",
+ "DELETE_MESSAGE",
+ "BAN_USER_FROM_CHANNEL",
+ "MUTE_USER_INSIDE_CHANNEL",
+ "ADD_CHANNEL_USER",
+ "REMOVE_CHANNEL_USER",
+ "EDIT_CHANNEL_USER",
+ "ASSIGN_CHANNEL_USER_ROLE",
+ "BAN_USER",
+ "EDIT_USER",
+ "ASSIGN_USER_ROLE",
+ "EDIT_USER_FEED_POST",
+ "DELETE_USER_FEED_POST",
+ "EDIT_USER_FEED_COMMENT",
+ "DELETE_USER_FEED_COMMENT",
+ "ADD_COMMUNITY_USER",
+ "REMOVE_COMMUNITY_USER",
+ "EDIT_COMMUNITY_USER",
+ "BAN_COMMUNITY_USER",
+ "MUTE_COMMUNITY_USER",
+ "EDIT_COMMUNITY",
+ "DELETE_COMMUNITY",
+ "EDIT_COMMUNITY_POST",
+ "DELETE_COMMUNITY_POST",
+ "PIN_COMMUNITY_POST",
+ "EDIT_COMMUNITY_COMMENT",
+ "DELETE_COMMUNITY_COMMENT",
+ "ASSIGN_COMMUNITY_USER_ROLE",
+ "CREATE_COMMUNITY_CATEGORY",
+ "EDIT_COMMUNITY_CATEGORY",
+ "DELETE_COMMUNITY_CATEGORY",
+ "CREATE_ROLE",
+ "EDIT_ROLE",
+ "DELETE_ROLE",
+ "MANAGE_COMMUNITY_STORY"
+ ]
+ }
+ },
+ "displayName": {
+ "type": "string"
+ },
+ "profileHandle": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "avatarFileId": {
+ "type": "string"
+ },
+ "avatarCustomUrl": {
+ "type": "string"
+ },
+ "flagCount": {
+ "type": "integer"
+ },
+ "hashFlag": {
+ "type": "object",
+ "properties": {
+ "bits": {
+ "type": "integer"
+ },
+ "hashes": {
+ "type": "integer"
+ },
+ "hash": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "metadata": {
+ "type": "object"
+ },
+ "isGlobalBan": {
+ "type": "boolean",
+ "description": "Global ban status. Every user can see this flag."
+ },
+ "isBrand": {
+ "type": "boolean",
+ "description": "Brand user status."
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "updatedAt": {
"type": "string",
"format": "date-time"
+ },
+ "isDeleted": {
+ "type": "boolean"
}
},
"required": [
- "userId"
+ "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"
+ }
+ }
}
}
}
}
}
},
- "403": {
- "description": "No permission to access this resource.",
+ "500": {
+ "description": "Unexpected error.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string"
+ },
+ "code": {
+ "type": "number"
+ },
+ "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": {
@@ -169092,16 +175233,82 @@
}
}
},
- "example": {
- "status": "error",
- "code": 400300,
- "message": "Forbidden error."
- }
+ "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"
},
- "500": {
- "description": "Unexpected error.",
+ "404": {
+ "description": "Resource Not Found error.",
"content": {
"application/json": {
"schema": {
@@ -169138,53 +175345,14 @@
},
"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"
- ]
+ "code": 404,
+ "message": "Resource Not Found."
}
}
}
},
- "403": {
- "description": "No permission to access this resource.",
+ "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": {
@@ -169221,8 +175389,8 @@
},
"example": {
"status": "error",
- "code": 400300,
- "message": "Forbidden error."
+ "code": 429,
+ "message": "RateLimit Exceed."
}
}
}
@@ -169265,48 +175433,76 @@
},
"example": {
"status": "error",
- "code": 500000,
+ "code": 500,
"message": "Unexpected error"
}
}
}
}
- },
+ }
+ }
+ },
+ "/api/v3/roles": {
+ "get": {
+ "summary": "Get roles (pagination support)",
+ "tags": [
+ "Role"
+ ],
"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"
- ]
+ "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
}
}
}
- },
- "403": {
- "description": "No permission to access this resource.",
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Role Information",
"content": {
"application/json": {
"schema": {
@@ -169315,36 +175511,48 @@
"status": {
"type": "string"
},
- "code": {
- "type": "number"
- },
- "message": {
- "type": "string"
- },
"data": {
- "type": "object",
- "properties": {
- "detail": {
- "oneOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "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"
},
- {
- "type": "object"
- }
- ]
- }
+ "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"
+ ]
}
}
}
- },
- "example": {
- "status": "error",
- "code": 400300,
- "message": "Forbidden error."
}
}
}
@@ -169393,131 +175601,158 @@
}
}
}
- },
+ }
+ },
+ "post": {
+ "summary": "Create role",
+ "tags": [
+ "Role"
+ ],
"security": [
{
"BearerAuth": []
}
- ]
- }
- },
- "/api/v1/reactions/live": {
- "post": {
- "summary": "Send live reactions",
- "description": "Send reactions to a live streaming.",
- "tags": [
- "Reaction"
],
+ "description": "Create a role\n",
"requestBody": {
- "description": "List of live reactions to submit.",
+ "description": "information of a role to be created.\n",
+ "required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "liveStreamId": {
+ "roleId": {
"type": "string",
- "description": "Live stream ID."
+ "description": "role id",
+ "minLength": 1,
+ "maxLength": 100
},
- "reactions": {
+ "displayName": {
+ "type": "string",
+ "description": "display name of role",
+ "minLength": 0,
+ "maxLength": 100
+ },
+ "permissions": {
"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"
- }
- }
- }
+ "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": {
- "202": {
- "description": "Live reaction submission response.",
+ "200": {
+ "description": "Role Information",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "reactions": {
+ "status": {
+ "type": "string"
+ },
+ "data": {
"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"
- ]
+ "roleId": {
+ "type": "string"
},
- "referencePublicId": {
- "type": "string",
- "description": "The public ID of the post."
+ "displayName": {
+ "type": "string"
},
- "referenceId": {
+ "updatedAt": {
"type": "string",
- "description": "The internal ID of the post."
+ "description": "The date/time when a role is updated or deleted.",
+ "format": "date-time"
},
- "referenceType": {
+ "createdAt": {
"type": "string",
- "enum": [
- "post"
- ],
- "description": "Type of reference (must be 'post')."
+ "description": "The date/time when a role is created.",
+ "format": "date-time"
},
- "reactionName": {
- "type": "string",
- "description": "Name of the reaction."
+ "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"
},
- "occurredAt": {
- "type": "string",
- "format": "date-time",
- "description": "The date/time when the reaction occurred."
+ "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": "No permission to access this resource.",
+ "description": "Permission denied.",
"content": {
"application/json": {
"schema": {
@@ -169554,14 +175789,14 @@
},
"example": {
"status": "error",
- "code": 400300,
- "message": "Forbidden error."
+ "code": 400301,
+ "message": "Permission denied"
}
}
}
},
- "404": {
- "description": "Resource Not Found error.",
+ "500": {
+ "description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
@@ -169598,14 +175833,96 @@
},
"example": {
"status": "error",
- "code": 400400,
- "message": "Resource Not Found."
+ "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"
+ ]
+ }
+ }
+ }
}
}
}
},
- "422": {
- "description": "Parameters validation error.",
+ "404": {
+ "description": "Resource Not Found error.",
"content": {
"application/json": {
"schema": {
@@ -169642,8 +175959,8 @@
},
"example": {
"status": "error",
- "code": 500000,
- "message": "Parameters validation error"
+ "code": 400400,
+ "message": "Resource Not Found."
}
}
}
@@ -169692,60 +176009,115 @@
}
}
}
- },
- "security": [
- {
- "BearerAuth": []
- }
- ]
- }
- },
- "/api/v2/reactions/messages/most": {
- "get": {
- "summary": "Get message ids by the most of reactions.",
+ }
+ },
+ "put": {
+ "summary": "Update role",
"tags": [
- "Reaction"
+ "Role"
],
"security": [
{
"BearerAuth": []
}
],
- "description": "Get message ids by the most of reactions.\n",
+ "description": "Update a role\n",
"parameters": [
{
- "name": "limit",
- "in": "query",
- "schema": {
- "type": "integer",
- "minimum": 1
- }
- },
- {
- "name": "reactionName",
- "description": "Reaction name",
- "in": "query",
+ "name": "roleId",
+ "in": "path",
+ "required": true,
"schema": {
- "type": "string",
- "maxLength": 100
+ "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": "Message information.",
+ "description": "Role Information",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "messageId": {
- "type": "string"
- },
- "reactionsCount": {
- "type": "integer"
+ "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"
+ ]
}
}
}
@@ -169753,8 +176125,8 @@
}
}
},
- "404": {
- "description": "Resource Not Found error.",
+ "403": {
+ "description": "Permission denied.",
"content": {
"application/json": {
"schema": {
@@ -169791,14 +176163,14 @@
},
"example": {
"status": "error",
- "code": 400400,
- "message": "Resource Not Found."
+ "code": 400301,
+ "message": "Permission denied"
}
}
}
},
- "429": {
- "description": "Error due to a client create the same request with the same parameters exceed the number of time that server limit to.",
+ "404": {
+ "description": "Resource Not Found error.",
"content": {
"application/json": {
"schema": {
@@ -169835,8 +176207,8 @@
},
"example": {
"status": "error",
- "code": 400311,
- "message": "RateLimit Exceed."
+ "code": 400400,
+ "message": "Resource Not Found."
}
}
}
@@ -169886,382 +176258,88 @@
}
}
}
- }
- },
- "/api/v2/reactions": {
- "get": {
- "summary": "get list of reactions.",
+ },
+ "delete": {
+ "summary": "Delete role",
"tags": [
- "Reaction"
+ "Role"
],
"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"
- }
- }
- }
- }
- }
- }
+ {
+ "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"
+ ]
}
}
}
@@ -170269,8 +176347,8 @@
}
}
},
- "404": {
- "description": "Resource Not Found error.",
+ "400": {
+ "description": "Bad Request error.",
"content": {
"application/json": {
"schema": {
@@ -170307,14 +176385,14 @@
},
"example": {
"status": "error",
- "code": 400400,
- "message": "Resource Not Found."
+ "code": 400000,
+ "message": "Bad Request."
}
}
}
},
- "500": {
- "description": "Unexpected error.",
+ "403": {
+ "description": "Permission denied.",
"content": {
"application/json": {
"schema": {
@@ -170351,76 +176429,8 @@
},
"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"
- }
- }
+ "code": 400301,
+ "message": "Permission denied"
}
}
}
@@ -170514,303 +176524,1181 @@
}
}
}
- },
- "delete": {
- "summary": "remove reaction from any document.",
+ }
+ },
+ "/api/v1/search/posts": {
+ "get": {
+ "summary": "Search posts",
"tags": [
- "Reaction"
+ "Post"
],
"security": [
{
"BearerAuth": []
}
],
- "description": "Remove reaction from a document referenced by ID and type.\n",
+ "description": "Search posts.\n",
"parameters": [
{
- "name": "referenceId",
- "description": "Reference id",
+ "name": "targetId",
"in": "query",
- "required": true,
"schema": {
"type": "string",
"maxLength": 900
- }
+ },
+ "description": "ID of the target."
},
{
- "name": "referenceType",
- "description": "Reference type",
+ "name": "targetType",
"in": "query",
"required": true,
"schema": {
"type": "string",
"enum": [
- "message",
- "post",
- "comment",
- "story"
+ "community",
+ "user",
+ "content"
]
- }
+ },
+ "description": "Type of the target.\n* `community` - Community\n* `user` - User\n* `content` - Content\n"
},
{
- "name": "reactionName",
- "description": "Reaction name",
+ "name": "sortBy",
"in": "query",
"schema": {
"type": "string",
- "maxLength": 100
+ "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": "checkStatus",
+ "in": "query",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "to-check",
+ "follow-up-needed",
+ "checked"
+ ],
+ "description": "Current check status of the content"
}
},
{
+ "name": "matchingOnlyParentPost",
"in": "query",
- "name": "referenceVersion",
"schema": {
- "type": "integer"
+ "type": "boolean",
+ "default": true
},
- "description": "The API version of the document (Ex. If using with message v5, the referenceVersion will be 5)"
+ "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": "includeModerationDetails",
+ "in": "query",
+ "schema": {
+ "type": "boolean",
+ "default": false
+ },
+ "description": "Include moderation details (flags, AI moderation, check notes) in response"
+ },
+ {
+ "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": "Returns a reaction id is removed",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "removedId": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Resource Not Found error.",
+ "description": "Post Information",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "status": {
- "type": "string"
- },
- "code": {
- "type": "number"
- },
- "message": {
- "type": "string"
+ "posts": {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "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",
+ "example": "text"
+ }
+ },
+ "required": [
+ "postId",
+ "data"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "checkNote": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "noteId": {
+ "type": "string",
+ "description": "Unique identifier for the check note"
+ },
+ "userId": {
+ "type": "string",
+ "description": "ID of the admin who created the note"
+ },
+ "action": {
+ "type": "string",
+ "enum": [
+ "check",
+ "need-follow-up",
+ "add-note"
+ ],
+ "description": "Action type of the check note"
+ },
+ "note": {
+ "type": "string",
+ "maxLength": 250,
+ "description": "Optional note text (max 250 characters)"
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "When the check note was created"
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "When the check note was last updated"
+ }
+ }
+ }
+ },
+ "checkStatus": {
+ "type": "string",
+ "enum": [
+ "to-check",
+ "follow-up-needed",
+ "checked"
+ ],
+ "description": "Current check status of the content"
+ }
+ }
+ }
+ ]
+ }
},
- "data": {
- "type": "object",
- "properties": {
- "detail": {
- "oneOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
+ "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"
},
- {
- "type": "object"
+ "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
}
- ]
- }
- }
- }
- }
- },
- "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"
- }
+ },
+ "hashtags": {
+ "type": "array",
+ "minItems": 0,
+ "maxItems": 30,
+ "items": {
+ "type": "string",
+ "maxLength": 100,
+ "example": "mobile_app"
},
- {
- "type": "object"
+ "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"
+ ]
}
- }
- }
- },
- "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": {
+ },
+ "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 document."
+ "description": "ID of a reference."
},
"referenceType": {
"type": "string",
- "description": "Type of document."
+ "enum": [
+ "post",
+ "content",
+ "story"
+ ],
+ "description": "Type of a reference (post/content)."
},
- "reactors": {
+ "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",
- "description": "List of mapping between reaction and reactor ID.",
+ "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": {
- "reactionName": {
- "type": "string",
- "description": "Name of reaction such as 'like', 'love' and 'wow'."
- },
- "userId": {
- "type": "string",
- "description": "ID of a creator."
- },
- "userPublicIdId": {
+ "type": {
"type": "string",
- "description": "Public ID of a creator."
+ "description": "type: * `user` - need to specific userIds and notification mentions individual user\n",
+ "enum": [
+ "user"
+ ]
},
- "userInternalId": {
- "type": "string",
- "description": "Internal ID of a creator."
+ "userIds": {
+ "type": "array",
+ "description": "Array of UserId.",
+ "items": {
+ "type": "string"
+ }
},
- "reactionId": {
- "type": "string",
- "description": "ID of a reaction."
+ "userPublicIds": {
+ "type": "array",
+ "description": "Array of UserPublicId.",
+ "items": {
+ "type": "string"
+ }
},
- "createdAt": {
+ "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",
- "description": "The date/time when a reaction is created.",
- "format": "date-time"
+ "enum": [
+ "image",
+ "video"
+ ]
},
- "updatedAt": {
- "type": "string",
- "description": "The date/time when a reaction is updated.",
- "format": "date-time"
+ "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": [
- "referenceId",
- "referenceType"
+ "commentId"
]
}
},
@@ -170954,47 +177842,6 @@
]
}
},
- "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": {
@@ -171086,1380 +177933,649 @@
}
}
},
- "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/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": {
+ "communities": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "roleId": {
- "type": "string"
+ "_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"
+ "type": "string",
+ "description": "Community name for displaying."
},
- "updatedAt": {
+ "avatarFileId": {
"type": "string",
- "description": "The date/time when a role is updated or deleted.",
- "format": "date-time"
+ "description": "ID of a avatar file."
},
- "createdAt": {
+ "description": {
"type": "string",
- "description": "The date/time when a role is created.",
- "format": "date-time"
+ "description": "Description of a community."
},
- "permissions": {
+ "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"
- },
- "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions"
+ }
+ },
+ "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
+ "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"
}
},
"required": [
- "roleId",
- "permissions",
- "updatedAt",
- "isDeleted"
+ "communityId",
+ "channelId",
+ "displayName"
]
}
- }
- }
- }
- }
- }
- },
- "500": {
- "description": "Unexpected error.",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string"
- },
- "code": {
- "type": "number"
- },
- "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": {
+ "communityUsers": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "roleId": {
- "type": "string"
+ "userId": {
+ "type": "string",
+ "description": "ID of a user."
},
- "displayName": {
- "type": "string"
+ "userPublicId": {
+ "type": "string",
+ "description": "Public ID of a user."
},
- "updatedAt": {
+ "userInternalId": {
"type": "string",
- "description": "The date/time when a role is updated or deleted.",
- "format": "date-time"
+ "description": "Internal ID of a user."
},
- "createdAt": {
+ "channelId": {
"type": "string",
- "description": "The date/time when a role is created.",
- "format": "date-time"
+ "description": "ID of a channel."
},
- "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"
+ "communityId": {
+ "type": "string",
+ "description": "ID of a community."
},
- "isDeleted": {
+ "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
- }
- },
- "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"
+ },
+ "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"
}
- ]
- }
- }
- }
- }
- },
- "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"
+ },
+ "permissions": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "MUTE_CHANNEL",
+ "CLOSE_CHANNEL",
+ "EDIT_CHANNEL",
+ "EDIT_CHANNEL_RATELIMIT",
+ "EDIT_MESSAGE",
+ "DELETE_MESSAGE",
+ "BAN_USER_FROM_CHANNEL",
+ "MUTE_USER_INSIDE_CHANNEL",
+ "ADD_CHANNEL_USER",
+ "REMOVE_CHANNEL_USER",
+ "EDIT_CHANNEL_USER",
+ "ASSIGN_CHANNEL_USER_ROLE",
+ "BAN_USER",
+ "EDIT_USER",
+ "ASSIGN_USER_ROLE",
+ "EDIT_USER_FEED_POST",
+ "DELETE_USER_FEED_POST",
+ "EDIT_USER_FEED_COMMENT",
+ "DELETE_USER_FEED_COMMENT",
+ "ADD_COMMUNITY_USER",
+ "REMOVE_COMMUNITY_USER",
+ "EDIT_COMMUNITY_USER",
+ "BAN_COMMUNITY_USER",
+ "MUTE_COMMUNITY_USER",
+ "EDIT_COMMUNITY",
+ "DELETE_COMMUNITY",
+ "EDIT_COMMUNITY_POST",
+ "DELETE_COMMUNITY_POST",
+ "PIN_COMMUNITY_POST",
+ "EDIT_COMMUNITY_COMMENT",
+ "DELETE_COMMUNITY_COMMENT",
+ "ASSIGN_COMMUNITY_USER_ROLE",
+ "CREATE_COMMUNITY_CATEGORY",
+ "EDIT_COMMUNITY_CATEGORY",
+ "DELETE_COMMUNITY_CATEGORY",
+ "CREATE_ROLE",
+ "EDIT_ROLE",
+ "DELETE_ROLE",
+ "MANAGE_COMMUNITY_STORY"
+ ]
}
- ]
+ },
+ "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"
+ }
}
}
- }
- }
- },
- "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": {
+ "categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "roleId": {
- "type": "string"
+ "categoryId": {
+ "type": "string",
+ "description": "ID of a community category."
},
- "displayName": {
- "type": "string"
+ "name": {
+ "type": "string",
+ "description": "Community category name for displaying."
},
- "updatedAt": {
+ "metadata": {
+ "type": "object",
+ "description": "Additional properties to support custom fields."
+ },
+ "avatarFileId": {
"type": "string",
- "description": "The date/time when a role is updated or deleted.",
- "format": "date-time"
+ "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 role is created.",
+ "description": "The date/time when a community category 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
+ "updatedAt": {
+ "type": "string",
+ "description": "The date/time when a community category is updated or deleted.",
+ "format": "date-time"
}
- },
- "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": {
+ "feeds": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "roleId": {
- "type": "string"
+ "targetId": {
+ "type": "string",
+ "description": "Target public id (community id or user id)"
},
- "displayName": {
- "type": "string"
+ "targetType": {
+ "type": "string",
+ "description": "Target that feed belong to",
+ "enum": [
+ "community",
+ "user"
+ ]
},
- "updatedAt": {
+ "postCount": {
+ "type": "number",
+ "description": "Post count in feed"
+ },
+ "feedType": {
"type": "string",
- "description": "The date/time when a role is updated or deleted.",
- "format": "date-time"
+ "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 role is created.",
+ "description": "The date/time when a feed 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
+ "updatedAt": {
+ "type": "string",
+ "description": "The date/time when a feed is updated.",
+ "format": "date-time"
}
- },
- "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": {
+ "videoStreamings": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "roleId": {
+ "streamId": {
"type": "string"
},
- "displayName": {
+ "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"
},
- "updatedAt": {
+ "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",
- "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": {
+ "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": "string"
- },
- "description": "The list of permission for this role. https://docs.amity.co/amity-sdk/core-concepts/user/user-permission#permissions"
+ "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"
+ }
+ }
+ }
+ }
+ }
},
- "isDeleted": {
+ "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"
},
- "required": [
- "roleId",
- "permissions",
- "updatedAt",
- "isDeleted"
- ]
+ "previous": {
+ "type": "string"
+ }
}
}
}
@@ -172511,8 +178627,8 @@
}
}
},
- "403": {
- "description": "Permission denied.",
+ "404": {
+ "description": "Resource Not Found error.",
"content": {
"application/json": {
"schema": {
@@ -172549,14 +178665,14 @@
},
"example": {
"status": "error",
- "code": 400301,
- "message": "Permission denied"
+ "code": 400400,
+ "message": "Resource Not Found."
}
}
}
},
- "404": {
- "description": "Resource Not Found 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": {
@@ -172593,8 +178709,8 @@
},
"example": {
"status": "error",
- "code": 400400,
- "message": "Resource Not Found."
+ "code": 400311,
+ "message": "RateLimit Exceed."
}
}
}
@@ -172646,155 +178762,150 @@
}
}
},
- "/api/v1/search/posts": {
+ "/api/v1/search/comments": {
"get": {
- "summary": "Search posts",
+ "summary": "Search comments",
"tags": [
- "Post"
+ "Comment"
],
"security": [
{
"BearerAuth": []
}
],
- "description": "Search posts.\n",
+ "description": "Search and filter comments with advanced criteria. Admin only.\n\n**Access Control:**\n- Admin only with ViewPostAndCommentManagement permission\n",
"parameters": [
{
- "name": "targetId",
+ "name": "checkStatus",
"in": "query",
"schema": {
"type": "string",
- "maxLength": 900
- },
- "description": "ID of the target."
+ "enum": [
+ "to-check",
+ "follow-up-needed",
+ "checked"
+ ],
+ "description": "Current check status of the content"
+ }
},
{
- "name": "targetType",
+ "name": "targetFeedType",
"in": "query",
- "required": true,
"schema": {
"type": "string",
"enum": [
- "community",
"user",
+ "community",
"content"
]
},
- "description": "Type of the target.\n* `community` - Community\n* `user` - User\n* `content` - Content\n"
+ "description": "Filter by target feed type"
},
{
- "name": "sortBy",
+ "name": "targetCommunityIds",
"in": "query",
"schema": {
- "type": "string",
- "enum": [
- "lastCreated",
- "firstCreated",
- "lastUpdated",
- "firstUpdated"
- ],
- "default": "lastCreated"
+ "type": "array",
+ "items": {
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]{24}$"
+ },
+ "maxItems": 10
},
- "description": "Sort order for posts."
+ "description": "Filter by target community IDs (max 10)",
+ "style": "form",
+ "explode": true
},
{
- "name": "hasFlag",
+ "name": "targetContentIds",
"in": "query",
"schema": {
- "type": "boolean",
- "default": null
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 900
+ },
+ "maxItems": 10
},
- "description": "Filter by flag status"
+ "description": "Filter by target content IDs (max 10)",
+ "style": "form",
+ "explode": true
},
{
- "name": "isDeleted",
+ "name": "targetUserIds",
"in": "query",
"schema": {
- "type": "boolean",
- "default": null
+ "type": "array",
+ "items": {
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]{24}$"
+ },
+ "maxItems": 10
},
- "description": "Filter by deleted status"
+ "description": "Filter by target user IDs (max 10)",
+ "style": "form",
+ "explode": true
},
{
- "name": "feedType",
+ "name": "creatorIds",
"in": "query",
"schema": {
- "type": "string",
- "enum": [
- "reviewing",
- "published",
- "declined"
- ],
- "example": "published"
+ "type": "array",
+ "items": {
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]{24}$"
+ },
+ "maxItems": 10
},
- "description": "Feed type to filter"
+ "description": "Filter by comment creator IDs (max 10)",
+ "style": "form",
+ "explode": true
},
{
- "name": "dataTypes",
+ "name": "isDeleted",
"in": "query",
"schema": {
- "type": "array",
- "minItems": 1,
- "maxItems": 6,
- "items": {
- "type": "string",
- "maxLength": 100,
- "enum": [
- "video",
- "image",
- "file",
- "liveStream",
- "poll",
- "clip"
- ]
- }
+ "type": "boolean",
+ "default": null
},
- "description": "Post data type to filter (include child posts too)."
+ "description": "Filter by deleted status"
},
{
- "name": "tags",
+ "name": "referenceType",
"in": "query",
"schema": {
- "type": "array",
- "minItems": 0,
- "maxItems": 5,
- "items": {
- "type": "string",
- "maximum": 24
- }
+ "type": "string",
+ "enum": [
+ "post",
+ "content",
+ "story"
+ ]
},
- "description": "tags"
+ "description": "Filter by reference type"
},
{
- "name": "hashtags",
+ "name": "sortBy",
"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"
- ]
+ "type": "string",
+ "enum": [
+ "lastCreated",
+ "firstCreated",
+ "lastUpdated",
+ "firstUpdated"
+ ],
+ "default": "lastCreated"
},
- "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."
+ "description": "Sort order for posts."
},
{
- "name": "matchingOnlyParentPost",
+ "name": "includeModerationDetails",
"in": "query",
"schema": {
"type": "boolean",
- "default": true
+ "default": false
},
- "description": "An option to filter only parent post. If `true` will return only parent post, else will return both parent and child posts\n"
+ "description": "Include moderation details (flags, AI moderation, check notes) in response"
},
{
"name": "options[limit]",
@@ -172826,15 +178937,6 @@
"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",
@@ -172848,672 +178950,300 @@
],
"responses": {
"200": {
- "description": "Post Information",
+ "description": "Serialized comments",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "posts": {
+ "comments": {
"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": [
- {
+ "allOf": [
+ {
+ "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",
- "title": "normal post",
- "description": "Standard post data (text, image, file, video)",
+ "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": {
- "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)."
+ "bits": {
+ "type": "integer"
},
- "thumbnailFileId": {
- "type": "string",
- "description": "video thumbnail file id (for video post)."
+ "hashes": {
+ "type": "integer"
},
- "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"
- }
+ "hash": {
+ "type": "array",
+ "items": {
+ "type": "string"
}
- },
- "streamId": {
- "type": "string",
- "description": "parent video streaming id (for video streaming post) - must be a parent stream"
}
}
},
- {
+ "reactions": {
"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"
- }
+ "description": "The mapping of reaction with reactionCounter.",
+ "example": {
+ "like": 1
}
- }
- ]
- },
- "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"
+ "reactionsCount": {
+ "type": "integer",
+ "description": "The number of all reactions for this comment.",
+ "example": 1
},
- "hash": {
+ "myReactions": {
"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"
- }
+ "example": "like"
},
- "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",
- "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."
+ "description": "The list of my reactions to this comment."
},
- "text": {
+ "isDeleted": {
+ "type": "boolean",
+ "default": false,
+ "description": "A flag to deleted a comment."
+ },
+ "editedAt": {
"type": "string",
- "description": "post text."
+ "description": "The date/time when comment is updated.",
+ "format": "date-time"
},
- "fileId": {
+ "createdAt": {
"type": "string",
- "description": "file key on cloud storage (for image, file post)."
+ "description": "The date/time when a comment is created.",
+ "format": "date-time"
},
- "thumbnailFileId": {
+ "updatedAt": {
"type": "string",
- "description": "video thumbnail file id (for video post)."
+ "description": "The date/time when a comment is updated or deleted.",
+ "format": "date-time"
},
- "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"
+ "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"
+ }
},
- "high": {
- "type": "string",
- "description": "high video quality file id"
- }
+ "required": [
+ "type",
+ "fileId"
+ ]
}
},
- "streamId": {
+ "targetId": {
"type": "string",
- "description": "parent video streaming id (for video streaming post) - must be a parent stream"
+ "description": "ID of a comment target."
+ },
+ "targetType": {
+ "type": "string",
+ "description": "Type of a comment target.",
+ "enum": [
+ "community",
+ "user",
+ "content"
+ ]
}
- }
- },
- "metadata": {
- "type": "object",
- "description": "Additional properties to support custom fields."
- },
- "flagCount": {
- "type": "integer",
- "description": "The number of users that has read this post."
+ },
+ "required": [
+ "commentId"
+ ]
},
- "hashFlag": {
+ {
"type": "object",
- "description": "The flag for checking internally that this post is reported or not.",
"properties": {
- "bits": {
- "type": "integer"
- },
- "hashes": {
- "type": "integer"
- },
- "hash": {
+ "checkNotes": {
"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"
+ "type": "object",
+ "properties": {
+ "noteId": {
+ "type": "string",
+ "description": "Unique identifier for the check note"
+ },
+ "userId": {
+ "type": "string",
+ "description": "ID of the admin who created the note"
+ },
+ "action": {
+ "type": "string",
+ "enum": [
+ "check",
+ "need-follow-up",
+ "add-note"
+ ],
+ "description": "Action type of the check note"
+ },
+ "note": {
+ "type": "string",
+ "maxLength": 250,
+ "description": "Optional note text (max 250 characters)"
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "When the check note was created"
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "When the check note was last updated"
+ }
}
}
+ },
+ "checkStatus": {
+ "type": "string",
+ "enum": [
+ "to-check",
+ "follow-up-needed",
+ "checked"
+ ],
+ "description": "Current check status of the content"
}
}
- },
- "impression": {
- "type": "integer"
- },
- "reach": {
- "type": "integer"
}
- },
- "required": [
- "postId",
- "data"
]
}
},
- "comments": {
+ "commentChildren": {
"type": "array",
"items": {
"type": "object",
@@ -173742,6 +179472,118 @@
]
}
},
+ "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"
+ ]
+ }
+ },
+ "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": {
@@ -173882,6 +179724,47 @@
]
}
},
+ "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": {
@@ -173973,640 +179856,6 @@
}
}
},
- "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"
- }
- },
- "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"
- ]
- }
- },
- "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": {
@@ -174667,8 +179916,8 @@
}
}
},
- "404": {
- "description": "Resource Not Found error.",
+ "403": {
+ "description": "No permission to access this resource.",
"content": {
"application/json": {
"schema": {
@@ -174705,8 +179954,8 @@
},
"example": {
"status": "error",
- "code": 400400,
- "message": "Resource Not Found."
+ "code": 400300,
+ "message": "Forbidden error."
}
}
}
diff --git a/schema/moderation.yaml b/schema/moderation.yaml
index b44d169d..f559171e 100644
--- a/schema/moderation.yaml
+++ b/schema/moderation.yaml
@@ -84,3 +84,63 @@ ModerationSetting:
type: "string"
description: "The date/time when a rule is updated or deleted."
format: "date-time"
+
+CheckNotes:
+ type: "array"
+ items:
+ type: "object"
+ properties:
+ noteId:
+ type: "string"
+ description: "Unique identifier for the check note"
+ userId:
+ type: "string"
+ description: "ID of the admin who created the note"
+ action:
+ type: "string"
+ enum:
+ - check
+ - need-follow-up
+ - add-note
+ description: "Action type of the check note"
+ note:
+ type: "string"
+ maxLength: 250
+ description: "Optional note text (max 250 characters)"
+ createdAt:
+ type: "string"
+ format: "date-time"
+ description: "When the check note was created"
+ updatedAt:
+ type: "string"
+ format: "date-time"
+ description: "When the check note was last updated"
+
+CheckStatus:
+ type: "string"
+ enum:
+ - to-check
+ - follow-up-needed
+ - checked
+ description: "Current check status of the content"
+
+CreateCheckNote:
+ type: "object"
+ required:
+ - action
+ properties:
+ action:
+ type: "string"
+ enum:
+ - check
+ - need-follow-up
+ - add-note
+ description: |
+ Action to take on the content:
+ - `check`: Mark content as checked
+ - `need-follow-up`: Mark content as needing follow-up
+ - `add-note`: Add a note without changing status
+ note:
+ type: "string"
+ maxLength: 250
+ description: "Optional note text (max 250 characters)"
diff --git a/swagger.yaml b/swagger.yaml
index 08ba4844..94425498 100644
--- a/swagger.yaml
+++ b/swagger.yaml
@@ -78,6 +78,10 @@ paths:
$ref: "./v3/comment/index.yaml#/_commentId-flags"
/api/v4/comments/{commentId}:
$ref: "./v4/comment/index.yaml#/_commentId"
+ /api/v4/comments/{commentId}/checks:
+ $ref: "./v4/comment/index.yaml#/commentId-checks"
+ /api/v4/comments/{commentId}/checks/{noteId}:
+ $ref: "./v4/comment/index.yaml#/commentId-checks-noteId"
/api/v3/communities:
$ref: "./v3/community/index.yaml#/root"
/api/v3/communities/{communityId}:
@@ -390,6 +394,10 @@ paths:
$ref: "./v4/post/index.yaml#/_postId"
/api/v5/posts:
$ref: "./v5/post/index.yaml#/root"
+ /api/v5/posts/{postId}/checks:
+ $ref: "./v5/post/index.yaml#/postId-checks"
+ /api/v5/posts/{postId}/checks/{noteId}:
+ $ref: "./v5/post/index.yaml#/postId-checks-noteId"
/api/v1/presence/settings:
$ref: "./v1/presence/index.yaml#/settings"
/api/v1/presence/settings/user:
@@ -418,6 +426,8 @@ paths:
$ref: "./v3/role/index.yaml#/_roleId"
/api/v1/search/posts:
$ref: "./v1/search/index.yaml#/posts"
+ /api/v1/search/comments:
+ $ref: "./v1/search/index.yaml#/comments"
/api/v1/semantic-search/posts:
$ref: "./v1/semantic-search/index.yaml#/posts"
/api/v1/semantic-search/communities:
diff --git a/v1/search/index.yaml b/v1/search/index.yaml
index 6b6b6736..dbb57b12 100644
--- a/v1/search/index.yaml
+++ b/v1/search/index.yaml
@@ -17,7 +17,9 @@ posts:
- $ref: "./parameter.yaml#/dataTypes"
- $ref: "./parameter.yaml#/tags"
- $ref: "./parameter.yaml#/hashtags"
+ - $ref: "./parameter.yaml#/checkStatus"
- $ref: "./parameter.yaml#/matchingOnlyParentPost"
+ - $ref: "./parameter.yaml#/includeModerationDetails"
- $ref: "./parameter.yaml#/options.limit"
- $ref: "./parameter.yaml#/options.after"
- $ref: "./parameter.yaml#/options.before"
@@ -34,3 +36,42 @@ posts:
$ref: "../../global/error.yaml#/NotFoundError"
500:
$ref: "../../global/error.yaml#/UnexpectedError"
+
+comments:
+ get:
+ summary: "Search comments"
+ tags:
+ - "Comment"
+ security:
+ - BearerAuth: []
+ description: |
+ Search and filter comments with advanced criteria. Admin only.
+
+ **Access Control:**
+ - Admin only with ViewPostAndCommentManagement permission
+ parameters:
+ - $ref: "./parameter.yaml#/checkStatus"
+ - $ref: "./parameter.yaml#/targetFeedType"
+ - $ref: "./parameter.yaml#/targetCommunityIds"
+ - $ref: "./parameter.yaml#/targetContentIds"
+ - $ref: "./parameter.yaml#/targetUserIds"
+ - $ref: "./parameter.yaml#/creatorIds"
+ - $ref: "./parameter.yaml#/isDeleted"
+ - $ref: "./parameter.yaml#/referenceType"
+ - $ref: "./parameter.yaml#/sortBy"
+ - $ref: "./parameter.yaml#/includeModerationDetails"
+ - $ref: "./parameter.yaml#/options.limit"
+ - $ref: "./parameter.yaml#/options.after"
+ - $ref: "./parameter.yaml#/options.before"
+ - $ref: "./parameter.yaml#/options.token"
+ responses:
+ 200:
+ $ref: "../../v4/comment/response.yaml#/SerializedCommentsWithCheckStatus"
+ 400:
+ $ref: "../../global/error.yaml#/BadRequestError"
+ 403:
+ $ref: "../../global/error.yaml#/ForbiddenError"
+ 429:
+ $ref: "../../global/error.yaml#/RateLimitError"
+ 500:
+ $ref: "../../global/error.yaml#/UnexpectedError"
diff --git a/v1/search/parameter.yaml b/v1/search/parameter.yaml
index b41e9f56..361cd28c 100644
--- a/v1/search/parameter.yaml
+++ b/v1/search/parameter.yaml
@@ -161,3 +161,93 @@ hashtags:
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.
+
+checkStatus:
+ name: checkStatus
+ in: query
+ schema:
+ $ref: '../../schema/moderation.yaml#/CheckStatus'
+
+targetFeedType:
+ name: targetFeedType
+ in: query
+ schema:
+ type: string
+ enum:
+ - user
+ - community
+ - content
+ description: Filter by target feed type
+
+targetCommunityIds:
+ name: targetCommunityIds
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ pattern: '^[0-9a-fA-F]{24}$'
+ maxItems: 10
+ description: Filter by target community IDs (max 10)
+ style: form
+ explode: true
+
+targetContentIds:
+ name: targetContentIds
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ maxLength: 900
+ maxItems: 10
+ description: Filter by target content IDs (max 10)
+ style: form
+ explode: true
+
+targetUserIds:
+ name: targetUserIds
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ pattern: '^[0-9a-fA-F]{24}$'
+ maxItems: 10
+ description: Filter by target user IDs (max 10)
+ style: form
+ explode: true
+
+creatorIds:
+ name: creatorIds
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ pattern: '^[0-9a-fA-F]{24}$'
+ maxItems: 10
+ description: Filter by comment creator IDs (max 10)
+ style: form
+ explode: true
+
+referenceType:
+ name: referenceType
+ in: query
+ schema:
+ type: string
+ enum:
+ - post
+ - content
+ - story
+ description: Filter by reference type
+
+includeModerationDetails:
+ name: includeModerationDetails
+ in: query
+ schema:
+ type: boolean
+ default: false
+ description: Include moderation details (flags, AI moderation, check notes) in response
+
+
diff --git a/v1/search/response.yaml b/v1/search/response.yaml
index 943ef735..e7239a91 100644
--- a/v1/search/response.yaml
+++ b/v1/search/response.yaml
@@ -8,7 +8,14 @@ post-pagination-response-200:
posts:
type: array
items:
- $ref: "../../schema/post.yaml#/PostV5"
+ allOf:
+ - $ref: "../../schema/post.yaml#/PostV5"
+ - type: object
+ properties:
+ checkNote:
+ $ref: "../../schema/moderation.yaml#/CheckNotes"
+ checkStatus:
+ $ref: "../../schema/moderation.yaml#/CheckStatus"
postChildren:
type: array
items:
diff --git a/v4/comment/index.yaml b/v4/comment/index.yaml
index 2d0c5e02..f213954c 100644
--- a/v4/comment/index.yaml
+++ b/v4/comment/index.yaml
@@ -17,3 +17,98 @@ _commentId:
$ref: "../../global/error.yaml#/NotFoundError"
500:
$ref: "../../global/error.yaml#/UnexpectedError"
+
+commentId-checks:
+ post:
+ summary: "Add check note to comment"
+ tags:
+ - "Comment"
+ security:
+ - BearerAuth: []
+ description: |
+ Add a check note to a comment for content review purposes. Admin only.
+
+ **Check Actions:**
+ - `check`: Mark the comment as checked/reviewed
+ - `need-follow-up`: Mark the comment as needing follow-up review
+ - `add-note`: Add a note without changing the check status (maximum 5 notes, not included note on check or need-follow-up)
+
+ **Check Status Updates:**
+ - When action is `check`, checkStatus becomes `checked`
+ - When action is `need-follow-up`, checkStatus becomes `follow-up-needed`
+ - When action is `add-note`, checkStatus remains unchanged
+
+ **Access Control:**
+ - Admin only with ManagePostAndComment permission
+ parameters:
+ - name: commentId
+ in: path
+ required: true
+ schema:
+ type: string
+ pattern: '^[0-9a-fA-F]{24}$'
+ description: "MongoDB ObjectId of the comment"
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "../../schema/moderation.yaml#/CreateCheckNote"
+ responses:
+ 200:
+ $ref: "./response.yaml#/SerializedCommentsWithCheckStatus"
+ 400:
+ $ref: "../../global/error.yaml#/BadRequestError"
+ 403:
+ $ref: "../../global/error.yaml#/ForbiddenError"
+ 404:
+ $ref: "../../global/error.yaml#/NotFoundError"
+ 500:
+ $ref: "../../global/error.yaml#/UnexpectedError"
+
+commentId-checks-noteId:
+ delete:
+ summary: "Delete check note from comment"
+ tags:
+ - "Comment"
+ security:
+ - BearerAuth: []
+ description: |
+ Delete a specific check note from a comment. Admin only.
+
+ **Important Notes:**
+ - Soft deletes the check note (marks as deleted)
+ - Does not affect the comment's check status
+ - Admin only with ManagePostAndComment permission
+ parameters:
+ - name: commentId
+ in: path
+ required: true
+ schema:
+ type: string
+ pattern: '^[0-9a-fA-F]{24}$'
+ description: "MongoDB ObjectId of the comment"
+ - name: noteId
+ in: path
+ required: true
+ schema:
+ type: string
+ pattern: '^[0-9a-fA-F]{24}$'
+ description: "MongoDB ObjectId of the check note"
+ responses:
+ 200:
+ description: "Check note deleted successfully"
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ success:
+ type: boolean
+ example: true
+ 403:
+ $ref: "../../global/error.yaml#/ForbiddenError"
+ 404:
+ $ref: "../../global/error.yaml#/NotFoundError"
+ 500:
+ $ref: "../../global/error.yaml#/UnexpectedError"
diff --git a/v4/comment/response.yaml b/v4/comment/response.yaml
index 8f68dd9c..19c4f1cf 100644
--- a/v4/comment/response.yaml
+++ b/v4/comment/response.yaml
@@ -153,3 +153,50 @@ comment-delete-response-200:
properties:
success:
type: boolean
+
+
+SerializedCommentsWithCheckStatus:
+ description: Serialized comments
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ comments:
+ type: array
+ items:
+ allOf:
+ - $ref: '../../schema/comment.yaml#/Comment'
+ - type: object
+ properties:
+ checkNotes:
+ $ref: "../../schema/moderation.yaml#/CheckNotes"
+ checkStatus:
+ $ref: "../../schema/moderation.yaml#/CheckStatus"
+ commentChildren:
+ type: array
+ items:
+ $ref: "../../schema/comment.yaml#/Comment"
+ communityUsers:
+ type: array
+ items:
+ $ref: "../../schema/community.yaml#/CommunityUser"
+ users:
+ type: array
+ items:
+ $ref: "../../schema/user.yaml#/UserV3"
+ roles:
+ type: array
+ items:
+ $ref: "../../schema/role.yaml#/RoleV3"
+ files:
+ type: array
+ items:
+ $ref: "../../schema/file.yaml#/File"
+ paging:
+ type: object
+ properties:
+ next:
+ type: string
+ previous:
+ type: string
diff --git a/v5/post/index.yaml b/v5/post/index.yaml
index 96744196..e0b33e24 100644
--- a/v5/post/index.yaml
+++ b/v5/post/index.yaml
@@ -34,3 +34,98 @@ root:
$ref: "../../global/error.yaml#/NotFoundError"
500:
$ref: "../../global/error.yaml#/UnexpectedError"
+
+postId-checks:
+ post:
+ summary: "Add check note to post"
+ tags:
+ - "Post"
+ security:
+ - BearerAuth: []
+ description: |
+ Add a check note to a post for content review purposes. Admin only.
+
+ **Check Actions:**
+ - `check`: Mark the post as checked/reviewed
+ - `need-follow-up`: Mark the post as needing follow-up review
+ - `add-note`: Add a note without changing the check status (maximum 5 notes, not included note on check or need-follow-up)
+
+ **Check Status Updates:**
+ - When action is `check`, checkStatus becomes `checked`
+ - When action is `need-follow-up`, checkStatus becomes `follow-up-needed`
+ - When action is `add-note`, checkStatus remains unchanged
+
+ **Access Control:**
+ - Admin only with ManagePostAndComment permission
+ parameters:
+ - name: postId
+ in: path
+ required: true
+ schema:
+ type: string
+ pattern: '^[0-9a-fA-F]{24}$'
+ description: "MongoDB ObjectId of the post"
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "../../schema/moderation.yaml#/CreateCheckNote"
+ responses:
+ 200:
+ $ref: "./response.yaml#/post-pagination-response-with-check-status"
+ 400:
+ $ref: "../../global/error.yaml#/BadRequestError"
+ 403:
+ $ref: "../../global/error.yaml#/ForbiddenError"
+ 404:
+ $ref: "../../global/error.yaml#/NotFoundError"
+ 500:
+ $ref: "../../global/error.yaml#/UnexpectedError"
+
+postId-checks-noteId:
+ delete:
+ summary: "Delete check note from post"
+ tags:
+ - "Post"
+ security:
+ - BearerAuth: []
+ description: |
+ Delete a specific check note from a post. Admin only.
+
+ **Important Notes:**
+ - Soft deletes the check note (marks as deleted)
+ - Does not affect the post's check status
+ - Admin only with ManagePostAndComment permission
+ parameters:
+ - name: postId
+ in: path
+ required: true
+ schema:
+ type: string
+ pattern: '^[0-9a-fA-F]{24}$'
+ description: "MongoDB ObjectId of the post"
+ - name: noteId
+ in: path
+ required: true
+ schema:
+ type: string
+ pattern: '^[0-9a-fA-F]{24}$'
+ description: "MongoDB ObjectId of the check note"
+ responses:
+ 200:
+ description: "Check note deleted successfully"
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ success:
+ type: boolean
+ example: true
+ 403:
+ $ref: "../../global/error.yaml#/ForbiddenError"
+ 404:
+ $ref: "../../global/error.yaml#/NotFoundError"
+ 500:
+ $ref: "../../global/error.yaml#/UnexpectedError"
diff --git a/v5/post/response.yaml b/v5/post/response.yaml
index 5b58eb31..ae0129fd 100644
--- a/v5/post/response.yaml
+++ b/v5/post/response.yaml
@@ -56,3 +56,69 @@ post-pagination-response-200:
type: string
previous:
type: string
+
+post-pagination-response-with-check-status:
+ description: Post Information
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ posts:
+ type: array
+ items:
+ allOf:
+ - $ref: "../../schema/post.yaml#/PostV5"
+ - type: object
+ properties:
+ checkNote:
+ $ref: "../../schema/moderation.yaml#/CheckNotes"
+ checkStatus:
+ $ref: "../../schema/moderation.yaml#/CheckStatus"
+ postChildren:
+ type: array
+ items:
+ $ref: "../../schema/post.yaml#/PostV4"
+ comments:
+ type: array
+ items:
+ $ref: "../../schema/comment.yaml#/Comment"
+ users:
+ type: array
+ items:
+ $ref: "../../schema/user.yaml#/UserV3"
+ files:
+ type: array
+ items:
+ $ref: "../../schema/file.yaml#/File"
+ communities:
+ type: array
+ items:
+ $ref: "../../schema/community.yaml#/Community"
+ communityUsers:
+ type: array
+ items:
+ $ref: "../../schema/community.yaml#/CommunityUser"
+ categories:
+ type: array
+ items:
+ $ref: "../../schema/community.yaml#/CommunityCategory"
+ feeds:
+ type: array
+ items:
+ $ref: "../../schema/feed.yaml#/Feed"
+ videoStreamings:
+ type: array
+ items:
+ $ref: "../../schema/video-streaming.yml#/VideoStreaming"
+ videoStreamingChildren:
+ type: array
+ items:
+ $ref: "../../schema/video-streaming.yml#/VideoStreaming"
+ paging:
+ type: object
+ properties:
+ next:
+ type: string
+ previous:
+ type: string