CreateRelatedItem
Creates a related item (comments, tasks, and contacts) and associates it with a case.
Note
-
A Related Item is a resource that is associated with a case. It may or may not have an external identifier linking it to an external resource (for example, a
contactArn
). All Related Items have their own internal identifier, therelatedItemArn
. Examples of related items includecomments
andcontacts
. -
If you provide a value for
performedBy.userArn
you must also have DescribeUser permission on the ARN of the user that you provide. -
The
type
field is reserved for internal use only.
Request Syntax
POST /domains/domainId
/cases/caseId
/related-items/ HTTP/1.1
Content-type: application/json
{
"content": { ... },
"performedBy": { ... },
"type": "string
"
}
URI Request Parameters
The request uses the following URI parameters.
Request Body
The request accepts the following data in JSON format.
- content
-
The content of a related item to be created.
Type: RelatedItemInputContent object
Note: This object is a Union. Only one member of this object can be specified or returned.
Required: Yes
- performedBy
-
Represents the creator of the related item.
Type: UserUnion object
Note: This object is a Union. Only one member of this object can be specified or returned.
Required: No
- type
-
The type of a related item.
Type: String
Valid Values:
Contact | Comment | File
Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"relatedItemArn": "string",
"relatedItemId": "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.
-
The Amazon Resource Name (ARN) of the related item.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 500.
-
The unique identifier of the related item.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 500.
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
- InternalServerException
-
We couldn't process your request because of an issue with the server. Try again later.
HTTP Status Code: 500
- ResourceNotFoundException
-
We couldn't find the requested resource. Check that your resources exists and were created in the same AWS Region as your request, and try your request again.
HTTP Status Code: 404
- ServiceQuotaExceededException
-
The service quota has been exceeded. For a list of service quotas, see Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.
HTTP Status Code: 402
- ThrottlingException
-
The rate has been exceeded for this API. Please try again after a few minutes.
HTTP Status Code: 429
- ValidationException
-
The request isn't valid. Check the syntax and try again.
HTTP Status Code: 400
Examples
Request and Response example
This example illustrates one usage of CreateRelatedItem.
{ "content": { "comment": { "body": "Hello World!", "contentType": "Text/Plain" } }, "type": "Comment" }
{ "relatedItemArn": "arn:aws:cases:us-west-2:[account_id]:domain/[domain_id]/case/[case_id]/related-item/[related_item_id]", "relatedItemId": "[related_item_id]" }
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: