Create Chat Thread - Create Chat Thread
チャット スレッドを作成します。
POST {endpoint}/chat/threads?api-version=2020-09-21-preview2
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
endpoint
|
path | True |
string |
Azure Communication リソースのエンドポイント。 |
api-version
|
query | True |
string |
呼び出す API のバージョン。 |
要求ヘッダー
名前 | 必須 | 型 | 説明 |
---|---|---|---|
Authorization | True |
string |
ACS (Azure Communication Services) ユーザー アクセス トークン。 |
要求本文
名前 | 必須 | 型 | 説明 |
---|---|---|---|
members | True |
チャット スレッドに追加されるメンバー。 |
|
topic | True |
string |
チャット スレッド トピック。 |
応答
名前 | 型 | 説明 |
---|---|---|
401 Unauthorized |
不正 |
|
403 Forbidden |
禁じられた |
|
429 Too Many Requests |
要求が多すぎます |
|
Other Status Codes |
スレッドの作成とスレッド メンバーの追加操作の状態を含む複数状態の応答。
スレッドが正常に作成された場合、 |
|
Other Status Codes |
サービスを利用できない |
セキュリティ
Authorization
ACS (Azure Communication Services) ユーザー アクセス トークン。
型:
apiKey
/:
header
例
Create chat thread
要求のサンプル
POST https://contoso.westus.communications.azure.com/chat/threads?api-version=2020-09-21-preview2
{
"topic": "Lunch",
"members": [
{
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10a",
"displayName": "Jane"
},
{
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b",
"displayName": "Alex"
},
{
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10c",
"displayName": "Bob"
},
{
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10a",
"displayName": "Peter"
}
]
}
応答のサンプル
Location: https://contoso.westus.communications.azure.com/chat/threads/19%3Auni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2
{
"multipleStatus": [
{
"id": "19:b355e41860604e7dacd072d586f47818@thread.v2",
"statusCode": 201
},
{
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10a",
"statusCode": 201
},
{
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b",
"statusCode": 201
},
{
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10c",
"statusCode": 201
},
{
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10a",
"statusCode": 403,
"message": "Permissions check failed"
}
]
}
{
"code": "Unauthorized",
"message": "Request is not authorized."
}
{
"code": "Forbidden",
"message": "User is not allowed to perform specified action."
}
{
"code": "TooManyRequests",
"message": "Rate limit exceeded."
}
{
"code": "ServiceUnavailable",
"message": "The server is currently unable to handle the request."
}
定義
名前 | 説明 |
---|---|
Chat |
チャット スレッドのメンバー。 |
Create |
チャット スレッドを作成するための要求ペイロード。 |
Error | |
Individual |
|
Multi |
ChatThreadMember
チャット スレッドのメンバー。
名前 | 型 | 説明 |
---|---|---|
displayName |
string |
チャット スレッド メンバーの表示名。 |
id |
string |
|
shareHistoryTime |
string (date-time) |
チャット履歴がメンバーと共有される時間。 タイムスタンプは ISO8601 形式です: |
CreateChatThreadRequest
チャット スレッドを作成するための要求ペイロード。
名前 | 型 | 説明 |
---|---|---|
members |
チャット スレッドに追加されるメンバー。 |
|
topic |
string |
チャット スレッド トピック。 |
Error
名前 | 型 | 説明 |
---|---|---|
code |
string |
|
innerErrors |
Error[] |
|
message |
string |
|
target |
string |
IndividualStatusResponse
名前 | 型 | 説明 |
---|---|---|
id |
string |
個々の状態が対応するリソースを識別します。 |
message |
string |
キーによって識別されたリソースに対して操作が失敗した理由を説明するメッセージ。操作が成功した場合は null。 |
statusCode |
integer (int32) |
リソース操作の状態コード。 可能な値は、更新または削除が成功した場合は 200、作成が成功した場合は 201、形式が正しくない入力の場合は 400、操作を実行するアクセス許可がない場合は 403、リソースが見つからない場合は 404 です。 |
type |
string |
個々の状態が対応するリソースの種類を識別します。 |
MultiStatusResponse
名前 | 型 | 説明 |
---|---|---|
multipleStatus |
要求内の各リソースの状態情報の一覧。 |