CreateQuickResponse
Creates an Amazon Q in Connect quick response.
Request Syntax
POST /knowledgeBases/knowledgeBaseId
/quickResponses HTTP/1.1
Content-type: application/json
{
"channels": [ "string
" ],
"clientToken": "string
",
"content": { ... },
"contentType": "string
",
"description": "string
",
"groupingConfiguration": {
"criteria": "string
",
"values": [ "string
" ]
},
"isActive": boolean
,
"language": "string
",
"name": "string
",
"shortcutKey": "string
",
"tags": {
"string
" : "string
"
}
}
URI Request Parameters
The request uses the following URI parameters.
- knowledgeBaseId
-
The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.
Pattern:
^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$|^arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}$
Required: Yes
Request Body
The request accepts the following data in JSON format.
- channels
-
The Amazon Connect channels this quick response applies to.
Type: Array of strings
Length Constraints: Minimum length of 1. Maximum length of 10.
Required: No
- clientToken
-
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the AWS SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs
. Type: String
Length Constraints: Minimum length of 1. Maximum length of 4096.
Required: No
- content
-
The content of the quick response.
Type: QuickResponseDataProvider object
Note: This object is a Union. Only one member of this object can be specified or returned.
Required: Yes
- contentType
-
The media type of the quick response content.
-
Use
application/x.quickresponse;format=plain
for a quick response written in plain text. -
Use
application/x.quickresponse;format=markdown
for a quick response written in richtext.
Type: String
Pattern:
^(application/x\.quickresponse;format=(plain|markdown))$
Required: No
-
- description
-
The description of the quick response.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- groupingConfiguration
-
The configuration information of the user groups that the quick response is accessible to.
Type: GroupingConfiguration object
Required: No
- isActive
-
Whether the quick response is active.
Type: Boolean
Required: No
- language
-
The language code value for the language in which the quick response is written. The supported language codes include
de_DE
,en_US
,es_ES
,fr_FR
,id_ID
,it_IT
,ja_JP
,ko_KR
,pt_BR
,zh_CN
,zh_TW
Type: String
Length Constraints: Minimum length of 2. Maximum length of 5.
Required: No
- name
-
The name of the quick response.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Required: Yes
- shortcutKey
-
The shortcut key of the quick response. The value should be unique across the knowledge base.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 10.
Required: No
-
The tags used to organize, track, or control access for this resource.
Type: String to string map
Key Length Constraints: Minimum length of 1. Maximum length of 128.
Key Pattern:
^(?!aws:)[a-zA-Z+-=._:/]+$
Value Length Constraints: Minimum length of 1. Maximum length of 256.
Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"quickResponse": {
"channels": [ "string" ],
"contents": {
"markdown": { ... },
"plainText": { ... }
},
"contentType": "string",
"createdTime": number,
"description": "string",
"groupingConfiguration": {
"criteria": "string",
"values": [ "string" ]
},
"isActive": boolean,
"knowledgeBaseArn": "string",
"knowledgeBaseId": "string",
"language": "string",
"lastModifiedBy": "string",
"lastModifiedTime": number,
"name": "string",
"quickResponseArn": "string",
"quickResponseId": "string",
"shortcutKey": "string",
"status": "string",
"tags": {
"string" : "string"
}
}
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- quickResponse
-
The quick response.
Type: QuickResponseData object
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
You do not have sufficient access to perform this action.
HTTP Status Code: 403
- ConflictException
-
The request could not be processed because of conflict in the current state of the resource. For example, if you're using a
Create
API (such asCreateAssistant
) that accepts name, a conflicting resource (usually with the same name) is being created or mutated.HTTP Status Code: 409
- ResourceNotFoundException
-
The specified resource does not exist.
HTTP Status Code: 404
- ServiceQuotaExceededException
-
You've exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use service quotas to request a service quota increase.
HTTP Status Code: 402
- ValidationException
-
The input fails to satisfy the constraints specified by a service.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: