

# Programming with the Amazon Connect APIs
<a name="connect-service-api"></a>

The following sections provide additional information about using the Amazon Connect service APIs.

**Topics**
+ [Best practices](best-practices-connect-apis.md)
+ [Working with Attachments](working-with-acps-api.md)
+ [Best practices for using PutDialRequestBatch](api-outbound-campaign-calls.md)
+ [Eventual consistency](eventual-consistency.md)
+ [Resource integrations](resource-integrations.md)

# Best practices for using Amazon Connect APIs
<a name="best-practices-connect-apis"></a>

This topic provides guidance for using Amazon Connect Describe and List APIs so you don't get unexpected 4xx errors for the response. It also explains how to configure your client Read APIs.

**Topics**
+ [Types of errors](#failure-types)
+ [Throttling in Amazon Connect APIs](#throttling)
+ [How to configure your client Read API(s)](#configure-client-read-apis)
+ [How to make 2 TPS work for List APIs](#configure-client-list-apis)
+ [How to make 2 TPS work for Create/Update APIs](#configure-client-create-apis)
+ [Hitting a resource quota? Delete resources](#delete-unused-resources)
+ [How to request an increase to an API throttling quota](#request-quota-increase)
+ [Supported SDKs](#supported-sdks)

## Types of errors
<a name="failure-types"></a>

The Amazon Connect APIs provide an HTTP interface. HTTP defines ranges of HTTP Status Codes for different types of error responses. 
+ Client errors are indicated by HTTP Status Code class of 4xx
+ Service errors are indicated by HTTP Status Code class of 5xx

In this reference guide, the documentation for each API has an **Errors** section that includes a brief discussion about HTTP status codes. We recommend looking there as part of your investigation when you get an error.

For information about the common errors returned by Amazon Connect public APIs, see [Common Errors](https://docs.aws.amazon.com/connect/latest/APIReference/CommonErrors.html).

## Throttling in Amazon Connect APIs
<a name="throttling"></a>

Throttling errors in Amazon Connect public API(s) are defined by HTTP status code 429. This HTTP status code can be retried by the client based on their requirement. 

**Important**  
The throttling limits are defined for each API separately at the AWS account level, not for the individual Amazon Connect instance.

To use any API for Amazon Connect resources (such as users, queues, and routing profiles), you need the [ID/ARN for the Amazon Connect instance](https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html). 

 By default, Amazon Connect limits the steady-state requests per second (RPS) across all APIs within an AWS account, per Region. It also limits the burst (that is, the maximum bucket size) across all APIs within an AWS account, per Region. 

In Amazon Connect the burst limit represents the target maximum number of concurrent request submissions that APIs will fulfill before returning *429 Too Many Requests* error responses. 

For more information about throttling quotas, see [Amazon Connect throttling quotas](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html#api-throttling-quotas). 

## How to configure your client Read API(s)
<a name="configure-client-read-apis"></a>

Your client configuration will vary based on number of resources that your API tries to describe/list per second.

In the following Java example, the number of retries is set to 3. This means after your Amazon Connect client implementation experiences throttling, it retries for maximum of 3 times. Instead of retrying immediately and aggressively, the following snippet waits a specified amount of time (between 0 to max of 5 seconds as defined by maxBackoffTime parameter) between tries and uses [EqualJitterBackoffStrategy](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/core/retry/backoff/EqualJitterBackoffStrategy.html). 

```
final class ClientBuilder {

    private static final int NUMBER_OF_RETRIES = 3;

    private static final RetryPolicy RETRY_POLICY =
            RetryPolicy.builder()
                    .numRetries(NUMBER_OF_RETRIES)
                    .retryCondition(RetryCondition.defaultRetryCondition())
                    .backoffStrategy(EqualJitterBackoffStrategy.builder()
                            .baseDelay(Duration.ofSeconds(1))
                            .maxBackoffTime(Duration.ofSeconds(5))
                            .build())
                    .build();

    public static ConnectClient getClient() {
        return ConnectClient.builder()
                .httpClient(LambdaWrapper.HTTP_CLIENT)
                .overrideConfiguration(ClientOverrideConfiguration.builder().retryPolicy(RETRY_POLICY).build())
                .build();
    }
}
```

When failures are caused by overload or contention, backing off often doesn't help as much as it seems like it should. This is because there's a correlation between failures and backing off/contention:
+ If all the failed calls back off to the same time, they cause contention or overload again when they are retried.

To address this, we recommend adding jitter. Jitter adds some amount of randomness to the backoff which spreads the retries around in time. For more information about how much jitter to add and the best ways to add it, see this AWS blog post: [Exponential Backoff and Jitter](https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/). 

For information about types of backoff strategies, see [Interface BackoffStrategy](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/core/retry/backoff/BackoffStrategy.html). 

## How to make 2 TPS work for List APIs when you have a large number of resources
<a name="configure-client-list-apis"></a>

There are two options: use List APIs with `maxResults` = 1,000, or use Search APIs as an alternative to List/Describe round trips. Both options are discussed here.

The List API of a particular Amazon Connect resource supports a `maxResults` parameter as part of request body. List API(s) support a maximum of 1,000 results in single API call unless specified otherwise in the documentation.

The following example shows the `maxResults` of the [ListUsers](https://docs.aws.amazon.com/connect/latest/APIReference/API_ListUsers.html) API.

```
String nextToken = null;
do {
    ListUsersRequest listUsersRequest = ListUsersRequest.builder()
            .instanceId(your Amazon Connect instanceId)
            .maxResults(1000)
            .nextToken(nextToken)
            .build();
    ListUsersResponse response = client.listUsers(listUsersRequest);
    System.out.println(response.sdkHttpResponse().statusCode());
} while (nextToken != null);
```

If `nextToken` is returned, then more results are available. The value of `nextToken` is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 `InvalidToken` error.

### When to use Search APIs instead of List APIs
<a name="search-apis"></a>

We recommend you assess the speed of pulling details for 100 records at a time (the Search API limit) instead of pulling 1,000 IDs and doing Describe round trips. It's better to try using Search APIs instead of combination of List and Describe API for a specific resource.

Let's say you have a situation where you're listing specific resources in your Amazon Connect instance and then call a Describe API on an individual resource. Instead, we recommend leveraging the Search API for that corresponding resource. Search APIs support several filters that can help to reduce response set as per requirement. 

## How to make 2 TPS work for Create/Update APIs when you have a large number of resources
<a name="configure-client-create-apis"></a>

There is a performance impact behind creating/updating resources at a default 2 TPS. For example, 100 resources can be created/updated with 2 TPS within 50 seconds. A 1,000 resources with this TPS would need nearly 8 minutes. Based on your use case, if the operation is impacting performance, contact Support and provide a business justification for your request to increase your throttling quota. See [How to request an increase to an API throttling quota](#request-quota-increase).

It is your responsibility to always implement the following best practices:
+ Check your logic and implement best practices to make your requests as efficient as possible. Check out [AWS Well-Architected Tool](https://docs.aws.amazon.com/wellarchitected/latest/userguide/intro.html) (AWS WA Tool) for processes that help measure your architecture using AWS best practices.
+ Test your requests and any custom processes *before adding them to production operations*.

## Hitting a resource quota? Delete unused / stale resources
<a name="delete-unused-resources"></a>

If you keep hitting the quota limit for a specific resource, we recommend deleting any unused or stale resources. You can find the Delete API for a resource on the resource-specific [Action pages](https://docs.aws.amazon.com/connect/latest/APIReference/actions-by-resource.html). These pages list all the APIs for a given resource.

## How to request an increase to an API throttling quota
<a name="request-quota-increase"></a>

**Important**  
We analyze all requests for quota increases and provide guidance for all queries.
We rarely approve requests if they apply to situations other than those listed below. 
For smaller increase requests, we can approve in hours. Larger increase requests take time to review, process, approve, and deploy. Depending on your specific implementation, your resource, and the size of quota that you want, a request can take up to 3 weeks. An extra-large worldwide increase can potentially take months. If you're increasing your quotas as part of a larger project, keep this information in mind and plan accordingly.

For instructions about how to use the [Service Quotas console](https://console.aws.amazon.com/servicequotas/home), see [Using the AWS Management Console to request an increase](https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html#quota-console-increase).

In the Services Quotas console, open an Support case and provide the following information:

1. Have you implemented the best practices explained in the [ Retry behavior](https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html) topic of the *AWS SDKs and Tools Reference Guide*?

1. What is the performance impact without the requested limit increase? Provide some calculations.

1. What is the expected number of resources customer is trying to create/update/describe every second with the APIs? 

1. What is the new quota for the API that you want?

Include in your case if the following situation(s) apply:
+ It is a migration request and you need high TPS for a specific time range to configure your instance(s).
+ There are performance or business impacting usecases, such as handling huge call volume for peak season.
+ You have thousands of resources with multiple concurrent agents working at the same time which might increase the overall traffic from your contact center.

## Supported SDKs for all Amazon Connect APIs
<a name="supported-sdks"></a>
+ [AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/reference/connect/#cli-aws-connect) 
+ [AWS SDK for .NET](https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/Connect/NConnect.html) 
+ [AWS SDK for C\$1\$1]( https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-connect/html/namespace_aws_1_1_connect.html) 
+  [AWS SDK for Go](https://docs.aws.amazon.com/sdk-for-go/api/service/connect/) 
+  [AWS SDK for Java V2](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/connect/ConnectClient.html) 
+  [AWS SDK for JavaScript](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/) 
+ [AWS SDK for PHP V3](https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-connect-2017-08-08.html) 
+  [AWS SDK for Python](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/connect.html) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Connect/Client.html) 

# Working with Attachments
<a name="working-with-acps-api"></a>

This topic explains how to work with attachments for Chat and Cases in Amazon Connect. For Chat Attachments, refer to the first section on the Amazon Connect Participant Service API. For Case Attachments, refer to the second section on the Amazon Connect service’s Attached Files APIs.

## Uploading Attachments with the Participant Service
<a name="uploading-attachments"></a>

There are three basic steps for uploading a file using the Amazon Connect Participant Service API. 

1. HTTP POST file metadata to `StartAttachmentUpload` API, which will provide a signed Amazon S3 URL and attachment ID for uploading the file directly to Amazon S3.

1. HTTP PUT file data to the signed Amazon S3 URL.

1. HTTP POST attachment ID to `CompleteAttachmentUpload` to finalize the upload to Amazon S3.

Below is a basic JavaScript implementation for reference purposes.

```
//Define the html element for file using input tag

<input type="file" id="fileUpload">
<input type="button" id="btnUploadFile" onclick="uploadFile()" value="Upload file">


async function uploadFile() {
    //Initiate the file upload by calling StartAttachmentUpload, providing the name, size, and content type of the file you want to upload.
    //The response will include a pre-signed URL and headers to use when building the file upload request, as well as an AttachmentId.
    const files = document.getElementById('fileUpload').files;
    const file = files[0];

    const startUploadRequest = {
        AttachmentName: file.name,
        AttachmentSizeInBytes: file.size,
        ContentType: file.type
    };
    const { AttachmentId, UploadMetadata } = await startAttachmentUpload(startUploadRequest);

    //Send the file data to the pre-signed S3 URL.
    //The file is stored in a temporary location in the S3 bucket.

    await uploadFileToS3(file, UploadMetadata.Url, UploadMetadata.HeadersToInclude);

    //Finalize the file upload by calling CompleteAttachmentUpload, providing the AttachmentId.
    //This moves the file to the final Attachments S3 path configured for the connect instance.
    const completeUploadRequest = {
        AttachmentIds: [ AttachmentId ]
    };
    await completeAttachmentUpload(completeUploadRequest);
}

async function startAttachmentUpload(requestData){
    const response = await fetch(StartAttachmentUploadEndpoint, {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json'
            'X-Amz-Bearer': ConnectionToken,
        },
        body: JSON.stringify(requestData)
    });

    return response.data;
}

async function uploadFileToS3(file, signedUrl, headersToInclude) {
    return fetch(signedUrl, {
      method: 'PUT',
      headers: headersToInclude,
      body: file
    });
}

async function completeAttachmentUpload(requestData){
    return fetch(CompleteAttachmentUploadEndpoint, {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json'
            'X-Amz-Bearer': ConnectionToken,
        },
        body: JSON.stringify(requestData)
    });
}
```

For an example of a real world implementation, view the [Amazon Connect ChatJS JavaScript client](https://github.com/amazon-connect/amazon-connect-chatjs/blob/master/src/client/client.js#L164-L219) on GitHub.

## Uploading Attached Files with the Connect Service
<a name="uploading-attachments-connect-service"></a>

The same basic steps follow from the Participant service instructions, for usage with the Amazon Connect service’s attached file APIs.

1. Call the `StartAttachedFileUpload` API with the required attached file information, which will provide a signed Amazon S3 URL, headers, and file ID for uploading the file directly to Amazon S3.

   1. If you are attaching a file to a Case, the calling identity must also have the `cases:CreateRelatedItem` permission on the target Case resource.

1. Using your http client of choice, PUT file data to the signed Amazon S3 URL, ensuring that you add the headers as required from the response of Step 1.

1. Call the `CompleteAttachedFileUpload` to finalize the upload to Amazon S3.

# Best practices for using PutDialRequestBatch for outbound campaign calling
<a name="api-outbound-campaign-calls"></a>

This topic provides guidance and best practices for using the [PutDialRequestBatch](https://docs.aws.amazon.com/connect-outbound/latest/APIReference/API_PutDialRequestBatch.html) API for outbound campaign calling. PutDialRequestBatch takes in a list of [DialRequest](https://docs.aws.amazon.com/connect-outbound/latest/APIReference/API_DialRequest.html) to be dialed as part of an outbound campaign.
+ Before using [PutDialRequestBatch](https://docs.aws.amazon.com/connect-outbound/latest/APIReference/API_PutDialRequestBatch.html), always use the [StartCampaign](https://docs.aws.amazon.com/connect-outbound/latest/APIReference/API_StartCampaign.html) API to start the outbound campaign. 
+ In [DialRequest](https://docs.aws.amazon.com/connect-outbound/latest/APIReference/API_DialRequest.html), set `expirationTime`—the timestamp when a dial request expires—to a future time, preferably a few minutes in the future to allow the outbound campaigns dialer algorithm to attempt to dial.

  Note the following failure codes:
  + `InvalidInput`: There's a request input mismatch with the parameters defined in [DialRequest](https://docs.aws.amazon.com/connect-outbound/latest/APIReference/API_DialRequest.html). Fix the request input and try again.
  + `RequestThrottled`: There aren't enough agents or telecom capacity available. The service maintains an upper limit on the number of records it can accept. When this limit is reached, the service returns a `RequestThrottled` message. This is a signal for you to stop sending more records and instead wait before attempting to retry, allowing the service to process and clear some records so it has room to accept more.
  + `UnknownError`: There is an internal failure in outbound campaigns. Please try again.

## Recommendations for tracking contact dispositions
<a name="track-contact-dispositions"></a>

A contact disposition is a type of state for a contact. It is either assigned by an agent from a pre-defined list that you provide (for example, **Sold**, **Wrong person**, **Right person, didn't sell**) or assigned by Amazon Connect for a contact (for example, `EXPIRED`, `CONTACT_FLOW_DISCONNECT`, or `TELECOM_PROBLEM`). For outbound campaigns, the contact disposition is assigned by Amazon Connect. 

You can use Amazon Connect contact records or contact events to track the contact dispositions for outbound campaigns. The key attribute to track contact disposition is DisconnectReason, which indicates how the voice contact was terminated. 

 Disconnect reasons can be grouped into the following 3 categories: 
+ **Success**: A contact is successfully dialed out. Values: `CUSTOMER_DISCONNECT | AGENT_DISCONNECT | THIRD_PARTY_DISCONNECT | BARGED | CONTACT_FLOW_DISCONNECT | OTHER`
+ **Expired**: This is expected behavior of the dialing algorithm. When the dialing algorithm determines insufficient dialing capacity (for example, because all agents are occupied or all telecom capacity is being used) during the duration set by the `expirationTime` parameter, Amazon Connect does not attempt to call such endpoints. In other words, those endpoints are expired. If you need higher throughput, you can submit a request for higher dialing capacity. Values: `EXPIRED`
+ **Failed**: Outbound campaigns failed a dial attempt because there are specific systematic errors. Values: `OUTBOUND_DESTINATION_ENDPOINT_ERROR | OUTBOUND_RESOURCE_ERROR | OUTBOUND_ATTEMPT_FAILED | TELECOM_PROBLEM`

For a description of each of these values, see DisconnectReason in the [Contact records data model](https://docs.aws.amazon.com/connect/latest/adminguide/ctr-data-model.html) topic in the *Amazon Connect Administrator Guide*.

If the disconnect reason is expired or failed type, take one of the following next steps:


| Disconnect reason value | Recommendation | 
| --- | --- | 
|  `EXPIRED`  |  We recommend that you use [PutDialRequestBatch](https://docs.aws.amazon.com/connect-outbound/latest/APIReference/API_PutDialRequestBatch.html) to create a new contact for this destination with a different client token.  | 
|  `OUTBOUND_DESTINATION_ENDPOINT_ERROR`  |  Check whether the current configuration of your Amazon Connect instance allows this destination to be dialed. For more information, see [Countries you can call by default](https://docs.aws.amazon.com/connect/latest/adminguide/country-code-allow-list.html).  | 
|  `OUTBOUND_RESOURCE_ERROR`  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/APIReference/api-outbound-campaign-calls.html)  | 
|  `OUTBOUND_ATTEMPT_FAILED`  |  There is an unidentified error. We recommend that you use [PutDialRequestBatch](https://docs.aws.amazon.com/connect-outbound/latest/APIReference/API_PutDialRequestBatch.html) to create a new contact for this destination with a different client token.   | 
|  `TELECOM_PROBLEM`  |  Disconnected due to an issue with connecting the call from the carrier, network congestion, network error, etc. We recommend that you use [PutDialRequestBatch](https://docs.aws.amazon.com/connect-outbound/latest/APIReference/API_PutDialRequestBatch.html) to create a new contact for this destination with a different client token.  | 

# Amazon Connect eventual consistency
<a name="eventual-consistency"></a>

The Amazon Connect API follows an [eventual consistency](https://en.wikipedia.org/wiki/Eventual_consistency) model due to the distributed nature of the system. As a result, changes to Amazon Connect resources might not be immediately visible to the subsequent commands you run. 

When you perform Amazon Connect API calls, there might be a brief delay before the change is available throughout Amazon Connect. It typically takes less than a few seconds for the change to propagate throughout the system, but in some cases it can take several minutes. You might get unexpected errors, such as a `ResourceNotFoundException` or an `InvalidRequestException`, during this time. For example, Amazon Connect might return a `ResourceNotFoundException` if you call [DescribeUser](https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeUser.html) immediately after calling [CreateUser](https://docs.aws.amazon.com/connect/latest/APIReference/API_CreateUser.html). 

We recommend that you configure a retry strategy on your Amazon Connect clients to automatically retry operations after a brief waiting period. For more information, see [Retry behavior](https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html) in the *AWS SDKs and Tools Reference Guide*.

# Resource integrations
<a name="resource-integrations"></a>

## CloudFormation
<a name="cloudformation-integration"></a>

Amazon Connect is integrated with [CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_Connect.html), a service that allows you to treat infrastructure as code. Use CloudFormation to model, provision, and manage AWS and third-party resources. 

The following Amazon Connect resource APIs support CloudFormation templates:
+ [AWS::Connect::ApprovedOrigin](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-approvedorigin.html)
+ [AWS::Connect::ContactFlow](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflow.html)
+ [AWS::Connect::ContactFlowModule](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-contactflowmodule.html)
+ [AWS::Connect::EvaluationForm](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-evaluationform.html)
+ [AWS::Connect::HoursOfOperation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-hoursofoperation.html)
+ [AWS::Connect::Instance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-instance.html)
+ [AWS::Connect::InstanceStorageConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-instancestorageconfig.html)
+ [AWS::Connect::IntegrationAssociation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-integrationassociation.html)
+ [AWS::Connect::PhoneNumber](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-phonenumber.html)
+ [AWS::Connect::Prompt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-prompt.html)
+ [AWS::Connect::Queue](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-queue.html)
+ [AWS::Connect::QuickConnect](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-quickconnect.html)
+ [AWS::Connect::RoutingProfile](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-routingprofile.html)
+ [AWS::Connect::Rule](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-rule.html)
+ [AWS::Connect::SecurityKey](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-securitykey.html)
+ [AWS::Connect::TaskTemplate](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-tasktemplate.html)
+ [AWS::Connect::TrafficDistributionGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-trafficdistributiongroup.html)
+ [AWS::Connect::User](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-user.html)
+ [AWS::Connect::UserHierarchyGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-userhierarchygroup.html)
+ [AWS::Connect::View](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-view.html)
+ [AWS::Connect::ViewVersion](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-viewversion.html)

## CloudTrail
<a name="cloudtrail-integration"></a>

Amazon Connect is integrated with AWS CloudTrail, a service that provides a record of the Amazon Connect API calls that a user, role, or AWS service makes. CloudTrail captures Amazon Connect API calls as events. All public Amazon Connect APIs support CloudTrail. 

For more information, see [Logging Amazon Connect API calls with AWS CloudTrail.](https://docs.aws.amazon.com/connect/latest/adminguide/logging-using-cloudtrail.html) 

## EventBridge
<a name="eventbridge-integration"></a>

Amazon Connect is integrated with Amazon EventBridge, a service that provides a record of the Amazon Connect API calls that a user, role, or AWS service makes. All public Amazon Connect APIs support EventBridge, with events published to CloudTrail consumable in EventBridge. 

Some Amazon Connect resources are integrated directly into EventBridge. For more information, see [EventBridge events emitted by Amazon Connect.](https://docs.aws.amazon.com/connect/latest/adminguide/connect-eventbridge-events.html) 