{ "swagger": "2.0", "info": { "title": "Azure Communication Chat Service", "description": "Azure Communication Chat Service", "contact": { "email": "acsdevexdisc@microsoft.com" }, "version": "2020-09-21-preview2" }, "paths": { "/chat/threads/{chatThreadId}/readreceipts": { "get": { "tags": [ "Threads" ], "summary": "Gets read receipts for a thread.", "operationId": "ListChatReadReceipts", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "Thread id to get the read receipts for.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Request successful. The action returns the requested `ReadReceipt` resources.", "schema": { "$ref": "#/definitions/ReadReceiptsCollection" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Get thread read receipts": { "$ref": "./examples/Conversations_ListChatReadReceipts.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink", "itemName": "value" } }, "post": { "tags": [ "Threads" ], "summary": "Sends a read receipt event to a thread, on behalf of a user.", "operationId": "SendChatReadReceipt", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "Thread id to send the read receipt event to.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "in": "body", "name": "body", "description": "Read receipt details.", "required": true, "schema": { "$ref": "#/definitions/SendReadReceiptRequest" } } ], "responses": { "201": { "description": "Request successful." }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Send read receipt": { "$ref": "./examples/Conversations_SendChatReadReceipt.json" } } } }, "/chat/threads/{chatThreadId}/messages": { "post": { "tags": [ "Messages" ], "summary": "Sends a message to a thread.", "operationId": "SendChatMessage", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "The thread id to send the message to.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "in": "body", "name": "body", "description": "Details of the message to send.", "required": true, "schema": { "$ref": "#/definitions/SendChatMessageRequest" } } ], "responses": { "201": { "description": "Message sent, the `Location` header contains the URL for the newly sent message.", "schema": { "$ref": "#/definitions/SendChatMessageResult" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Send Message": { "$ref": "./examples/Messages_SendChatMessage.json" } } }, "get": { "tags": [ "Messages" ], "summary": "Gets a list of messages from a thread.", "operationId": "ListChatMessages", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "The thread id of the message.", "required": true, "type": "string" }, { "in": "query", "name": "maxPageSize", "description": "The maximum number of messages to be returned per page. The limit can be found at https://docs.microsoft.com/azure/communication-services/concepts/service-limits#size-limits", "type": "integer", "format": "int32" }, { "in": "query", "name": "startTime", "description": "The earliest point in time to get messages up to. The timestamp should be in ISO8601 format: `yyyy-MM-ddTHH:mm:ssZ`.", "type": "string", "format": "date-time" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ChatMessagesCollection" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Get messages with pagination (max page size)": { "$ref": "./examples/Messages_ListChatMessagesWithPageSize.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink", "itemName": "value" } } }, "/chat/threads/{chatThreadId}/messages/{chatMessageId}": { "get": { "tags": [ "Messages" ], "summary": "Gets a message by id.", "operationId": "GetChatMessage", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "The thread id to which the message was sent.", "required": true, "type": "string" }, { "in": "path", "name": "chatMessageId", "description": "The message id.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Request successful. The action returns a `Message` resource.", "schema": { "$ref": "#/definitions/ChatMessage" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Get Message": { "$ref": "./examples/Messages_GetChatMessage.json" } } }, "patch": { "tags": [ "Messages" ], "summary": "Updates a message.", "operationId": "UpdateChatMessage", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "The thread id to which the message was sent.", "required": true, "type": "string" }, { "in": "path", "name": "chatMessageId", "description": "The message id.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "in": "body", "name": "body", "description": "Details of the request to update the message.", "required": true, "schema": { "$ref": "#/definitions/UpdateChatMessageRequest" } } ], "responses": { "200": { "description": "Message is successfully updated." }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Update message content": { "$ref": "./examples/Messages_UpdateChatMessage.json" } } }, "delete": { "tags": [ "Messages" ], "summary": "Deletes a message.", "operationId": "DeleteChatMessage", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "The thread id to which the message was sent.", "required": true, "type": "string" }, { "in": "path", "name": "chatMessageId", "description": "The message id.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "204": { "description": "Request successful." }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Delete message": { "$ref": "./examples/Messages_DeleteChatMessage.json" } } } }, "/chat/threads/{chatThreadId}/typing": { "post": { "tags": [ "Messages" ], "summary": "Posts a typing event to a thread, on behalf of a user.", "operationId": "SendTypingNotification", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "Id of the thread.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Request successful." }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Post typing event to a thread": { "$ref": "./examples/Messages_SendTypingNotification.json" } } } }, "/chat/threads/{chatThreadId}/members": { "get": { "tags": [ "ThreadMembers" ], "summary": "Gets the members of a thread.", "operationId": "ListChatThreadMembers", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "Thread id to get members for.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Request successful. The action returns the members of a thread.", "schema": { "$ref": "#/definitions/ChatThreadMembersCollection" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Get thread members": { "$ref": "./examples/ThreadMembers_ListChatThreadMembers.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink", "itemName": "value" } }, "post": { "tags": [ "ThreadMembers" ], "summary": "Adds thread members to a thread. If members already exist, no change occurs.", "operationId": "AddChatThreadMembers", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "Id of the thread to add members to.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "in": "body", "name": "body", "description": "Thread members to be added to the thread.", "required": true, "schema": { "$ref": "#/definitions/AddChatThreadMembersRequest" } } ], "responses": { "207": { "description": "Multi status response, containing the status for the thread member addition operations." }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Add thread members": { "$ref": "./examples/ThreadMembers_AddChatThreadMembers.json" } } } }, "/chat/threads/{chatThreadId}/members/{chatMemberId}": { "delete": { "tags": [ "ThreadMembers" ], "summary": "Remove a member from a thread.", "operationId": "RemoveChatThreadMember", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "Thread id to remove the member from.", "required": true, "type": "string" }, { "in": "path", "name": "chatMemberId", "description": "Id of the thread member to remove from the thread.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "204": { "description": "Request successful." }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Remove thread member": { "$ref": "./examples/ThreadMembers_RemoveChatThreadMember.json" } } } }, "/chat/threads": { "post": { "tags": [ "Threads" ], "summary": "Creates a chat thread.", "operationId": "CreateChatThread", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "in": "body", "name": "body", "description": "Request payload for creating a chat thread.", "required": true, "schema": { "$ref": "#/definitions/CreateChatThreadRequest" } } ], "responses": { "207": { "description": "Multi status response, containing the status for the thread creation and the thread member addition operations.\r\nIf the thread was created successfully, `Location` header would contain the URL for the newly created thread.", "schema": { "$ref": "#/definitions/MultiStatusResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Create chat thread": { "$ref": "./examples/Threads_CreateChatThread.json" } } }, "get": { "tags": [ "Threads" ], "summary": "Gets the list of chat threads of a user.", "operationId": "ListChatThreads", "produces": [ "application/json" ], "parameters": [ { "in": "query", "name": "maxPageSize", "description": "The maximum number of chat threads returned per page.", "type": "integer", "format": "int32" }, { "in": "query", "name": "startTime", "description": "The earliest point in time to get chat threads up to. The timestamp should be in ISO8601 format: `yyyy-MM-ddTHH:mm:ssZ`.", "type": "string", "format": "date-time" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Request successful. The action returns a `GetThreadsResponse` resource.", "schema": { "$ref": "#/definitions/ChatThreadsInfoCollection" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Get threads with pagination (Max Page Size)": { "$ref": "./examples/Threads_ListChatThreadsWithPageSize.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink", "itemName": "value" } } }, "/chat/threads/{chatThreadId}": { "patch": { "tags": [ "Threads" ], "summary": "Updates a thread's properties.", "operationId": "UpdateChatThread", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "The id of the thread to update.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "in": "body", "name": "body", "description": "Request payload for updating a chat thread.", "required": true, "schema": { "$ref": "#/definitions/UpdateChatThreadRequest" } } ], "responses": { "200": { "description": "Thread was successfully updated." }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Update chat thread topic": { "$ref": "./examples/Threads_UpdateChatThreadTopic.json" } } }, "get": { "tags": [ "Threads" ], "summary": "Gets a chat thread.", "operationId": "GetChatThread", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "Thread id to get.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Request successful. The action returns a `Thread` resource.", "schema": { "$ref": "#/definitions/ChatThread" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Get chat thread": { "$ref": "./examples/Threads_GetChatThread.json" } } }, "delete": { "tags": [ "Threads" ], "summary": "Deletes a thread.", "operationId": "DeleteChatThread", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "chatThreadId", "description": "Thread id to delete.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "204": { "description": "Request successful." }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "429": { "description": "Too many requests", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true }, "503": { "description": "Service unavailable", "schema": { "$ref": "#/definitions/Error" }, "x-ms-error-response": true } }, "x-ms-examples": { "Delete chat thread": { "$ref": "./examples/Threads_DeleteChatThread.json" } } } } }, "definitions": { "ReadReceipt": { "description": "A read receipt indicates the time a chat message was read by a recipient.", "type": "object", "properties": { "senderId": { "description": "Read receipt sender id.", "type": "string", "readOnly": true, "example": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" }, "chatMessageId": { "description": "Id for the chat message that has been read. This id is generated by the server.", "type": "string", "readOnly": true, "example": "1591137790240" }, "readOn": { "format": "date-time", "description": "Read receipt timestamp. The timestamp is in ISO8601 format: `yyyy-MM-ddTHH:mm:ssZ`.", "type": "string", "readOnly": true, "example": "2020-10-30T10:50:50Z" } } }, "ReadReceiptsCollection": { "type": "object", "properties": { "value": { "description": "Collection of read receipts.", "type": "array", "items": { "$ref": "#/definitions/ReadReceipt" }, "readOnly": true }, "nextLink": { "description": "If there are more read receipts that can be retrieved, the next link will be populated.", "type": "string", "readOnly": true } } }, "Error": { "type": "object", "properties": { "code": { "type": "string", "readOnly": true }, "message": { "type": "string", "readOnly": true }, "target": { "type": "string", "readOnly": true }, "innerErrors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "readOnly": true } } }, "SendReadReceiptRequest": { "description": "Request payload for sending a read receipt.", "required": [ "chatMessageId" ], "type": "object", "properties": { "chatMessageId": { "description": "Id of the latest chat message read by the user.", "type": "string", "example": "1592435762364" } } }, "ChatMessagePriority": { "description": "The chat message priority.", "enum": [ "Normal", "High" ], "type": "string", "x-ms-enum": { "name": "ChatMessagePriority", "modelAsString": true } }, "SendChatMessageRequest": { "description": "Details of the message to send.", "required": [ "content" ], "type": "object", "properties": { "priority": { "$ref": "#/definitions/ChatMessagePriority" }, "content": { "description": "Chat message content.", "type": "string", "example": "Come one guys, lets go for lunch together." }, "senderDisplayName": { "description": "The display name of the chat message sender. This property is used to populate sender name for push notifications.", "type": "string", "example": "Bob Admin" } } }, "SendChatMessageResult": { "description": "Result of the send message operation.", "type": "object", "properties": { "id": { "description": "A server-generated message id.", "type": "string", "readOnly": true, "example": "123456789" } } }, "ChatMessage": { "type": "object", "properties": { "id": { "description": "The id of the chat message. This id is server generated.", "type": "string", "readOnly": true, "example": "123456789" }, "type": { "description": "Type of the chat message.\r\n \r\nPossible values:\r\n - Text\r\n - ThreadActivity/TopicUpdate\r\n - ThreadActivity/AddMember\r\n - ThreadActivity/DeleteMember", "type": "string", "example": "Text" }, "priority": { "$ref": "#/definitions/ChatMessagePriority" }, "version": { "description": "Version of the chat message.", "type": "string", "readOnly": true }, "content": { "description": "Content of the chat message.", "type": "string", "example": "Come one guys, lets go for lunch together." }, "senderDisplayName": { "description": "The display name of the chat message sender. This property is used to populate sender name for push notifications.", "type": "string", "example": "Jane" }, "createdOn": { "format": "date-time", "description": "The timestamp when the chat message arrived at the server. The timestamp is in ISO8601 format: `yyyy-MM-ddTHH:mm:ssZ`.", "type": "string", "readOnly": true, "example": "2020-10-30T10:50:50Z" }, "senderId": { "description": "The id of the chat message sender.", "type": "string", "readOnly": true, "example": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" }, "deletedOn": { "format": "date-time", "description": "The timestamp when the chat message was deleted. The timestamp is in ISO8601 format: `yyyy-MM-ddTHH:mm:ssZ`.", "type": "string", "example": "2020-10-30T10:50:50Z" }, "editedOn": { "format": "date-time", "description": "The timestamp when the chat message was edited. The timestamp is in ISO8601 format: `yyyy-MM-ddTHH:mm:ssZ`.", "type": "string", "example": "2020-10-30T10:50:50Z" } } }, "ChatMessagesCollection": { "description": "Collection of chat messages for a particular chat thread.", "type": "object", "properties": { "value": { "description": "Collection of chat messages.", "type": "array", "items": { "$ref": "#/definitions/ChatMessage" }, "readOnly": true }, "nextLink": { "description": "If there are more chat messages that can be retrieved, the next link will be populated.", "type": "string", "readOnly": true } } }, "UpdateChatMessageRequest": { "type": "object", "properties": { "content": { "description": "Chat message content.", "type": "string", "example": "Let's go for lunch together." }, "priority": { "$ref": "#/definitions/ChatMessagePriority" } } }, "ChatThreadMember": { "description": "A member of the chat thread.", "required": [ "id" ], "type": "object", "properties": { "id": { "description": "The id of the chat thread member in the format `8:acs:ResourceId_AcsUserId`.", "type": "string", "example": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" }, "displayName": { "description": "Display name for the chat thread member.", "type": "string", "example": "Bob" }, "shareHistoryTime": { "format": "date-time", "description": "Time from which the chat history is shared with the member. The timestamp is in ISO8601 format: `yyyy-MM-ddTHH:mm:ssZ`.", "type": "string", "example": "2020-10-30T10:50:50Z" } } }, "ChatThreadMembersCollection": { "description": "Collection of thread members belong to a particular thread.", "type": "object", "properties": { "value": { "description": "Chat thread members.", "type": "array", "items": { "$ref": "#/definitions/ChatThreadMember" } }, "nextLink": { "description": "If there are more chat threads that can be retrieved, the next link will be populated.", "type": "string", "readOnly": true } } }, "AddChatThreadMembersRequest": { "description": "Thread members to be added to the thread.", "required": [ "members" ], "type": "object", "properties": { "members": { "description": "Members to add to a chat thread.", "type": "array", "items": { "$ref": "#/definitions/ChatThreadMember" } } } }, "CreateChatThreadRequest": { "description": "Request payload for creating a chat thread.", "required": [ "members", "topic" ], "type": "object", "properties": { "topic": { "description": "The chat thread topic.", "type": "string", "example": "Lunch Thread" }, "members": { "description": "Members to be added to the chat thread.", "type": "array", "items": { "$ref": "#/definitions/ChatThreadMember" } } } }, "IndividualStatusResponse": { "type": "object", "properties": { "id": { "description": "Identifies the resource to which the individual status corresponds.", "type": "string", "readOnly": true }, "statusCode": { "format": "int32", "description": "The status code of the resource operation.\r\n \r\nPossible values include:\r\n 200 for a successful update or delete,\r\n 201 for successful creation,\r\n 400 for a malformed input,\r\n 403 for lacking permission to execute the operation,\r\n 404 for resource not found.", "type": "integer", "readOnly": true }, "message": { "description": "The message explaining why the operation failed for the resource identified by the key; null if the operation succeeded.", "type": "string", "readOnly": true }, "type": { "description": "Identifies the type of the resource to which the individual status corresponds.", "type": "string", "readOnly": true } } }, "MultiStatusResponse": { "type": "object", "properties": { "multipleStatus": { "description": "The list of status information for each resource in the request.", "type": "array", "items": { "$ref": "#/definitions/IndividualStatusResponse" }, "readOnly": true } } }, "ChatThreadInfo": { "type": "object", "properties": { "id": { "description": "Chat thread id.", "type": "string", "readOnly": true, "example": "19:uni01_uy5ucb66ugp3lrhe7pxso6xx4hsmm3dl6eyjfefv2n6x3rrurpea@thread.v2" }, "topic": { "description": "Chat thread topic.", "type": "string", "example": "Lunch Chat thread" }, "isDeleted": { "description": "Flag if a chat thread is soft deleted.", "type": "boolean", "example": false }, "lastMessageReceivedOn": { "format": "date-time", "description": "The timestamp when the last message arrived at the server. The timestamp is in ISO8601 format: `yyyy-MM-ddTHH:mm:ssZ`.", "type": "string", "readOnly": true, "example": "2020-10-30T10:50:50Z" } } }, "ChatThreadsInfoCollection": { "description": "Collection of chat threads.", "type": "object", "properties": { "value": { "description": "Collection of chat threads.", "type": "array", "items": { "$ref": "#/definitions/ChatThreadInfo" }, "readOnly": true }, "nextLink": { "description": "If there are more chat threads that can be retrieved, the next link will be populated.", "type": "string", "readOnly": true } } }, "UpdateChatThreadRequest": { "type": "object", "properties": { "topic": { "description": "Chat thread topic.", "type": "string", "example": "Lunch Thread" } } }, "ChatThread": { "type": "object", "properties": { "id": { "description": "Chat thread id.", "type": "string", "readOnly": true, "example": "19:uni01_uy5ucb66ugp3lrhe7pxso6xx4hsmm3dl6eyjfefv2n6x3rrurpea@thread.v2" }, "topic": { "description": "Chat thread topic.", "type": "string", "example": "Lunch Chat thread" }, "createdOn": { "format": "date-time", "description": "The timestamp when the chat thread was created. The timestamp is in ISO8601 format: `yyyy-MM-ddTHH:mm:ssZ`.", "type": "string", "readOnly": true, "example": "2020-10-30T10:50:50Z" }, "createdBy": { "description": "Id of the chat thread owner.", "type": "string", "readOnly": true, "example": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" }, "members": { "description": "Chat thread members.", "type": "array", "items": { "$ref": "#/definitions/ChatThreadMember" } } } } }, "parameters": { "ApiVersionParameter": { "in": "query", "name": "api-version", "description": "Version of API to invoke.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "Endpoint": { "in": "path", "name": "endpoint", "description": "The endpoint of the Azure Communication resource.", "required": true, "type": "string", "x-ms-skip-url-encoding": true, "x-ms-parameter-location": "client" } }, "securityDefinitions": { "Authorization": { "type": "apiKey", "name": "Authorization", "in": "header", "description": "An ACS (Azure Communication Services) user access token." } }, "security": [ { "Authorization": [] } ], "x-ms-parameterized-host": { "hostTemplate": "{endpoint}", "useSchemePrefix": false, "parameters": [ { "$ref": "#/parameters/Endpoint" } ] } }