

# DisassociateEmailAddressAlias
<a name="API_DisassociateEmailAddressAlias"></a>

Removes the alias association between two email addresses in an Amazon Connect instance. After disassociation, emails sent to the former alias email address are no longer forwarded to the primary email address. Both email addresses continue to exist independently and can receive emails directly.

 **Use cases** 

Following are common uses cases for this API:
+  **Department separation**: Remove alias relationships when splitting a consolidated support queue back into separate department-specific queues.
+  **Email address retirement**: Cleanly remove forwarding relationships before decommissioning old email addresses.
+  **Organizational restructuring**: Reconfigure email routing when business processes change and aliases are no longer needed.

 **Important things to know** 
+ Concurrent operations: This API uses distributed locking, so concurrent operations on the same email addresses may be temporarily blocked.
+ Emails sent to the former alias address are still delivered directly to that address if it exists.
+ You do not need to delete the email addresses after disassociation. Both addresses remain active independently.
+ After a successful disassociation, you can immediately create a new alias relationship with the same addresses.
+ 200 status means alias was successfully disassociated.

 `DisassociateEmailAddressAlias` does not return the following information:
+ Details in the response about the email that was disassociated. The response returns an empty body.
+ The timestamp of when the disassociation occurred.

 **Endpoints**: See [Amazon Connect endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/connect_region.html).

 **Related operations** 
+  [AssociateEmailAddressAlias](https://docs.aws.amazon.com/connect/latest/APIReference/API_AssociateEmailAddressAlias.html): Associates an email address alias with an existing email address in an Amazon Connect instance.
+  [DescribeEmailAddress](https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeEmailAddress.html): View current alias configurations for an email address.
+  [SearchEmailAddresses](https://docs.aws.amazon.com/connect/latest/APIReference/API_SearchEmailAddresses.html): Find email addresses and their alias relationships across an instance.
+  [CreateEmailAddress](https://docs.aws.amazon.com/connect/latest/APIReference/API_CreateEmailAddress.html): Create new email addresses that can participate in alias relationships.
+  [DeleteEmailAddress](https://docs.aws.amazon.com/connect/latest/APIReference/API_DeleteEmailAddress.html): Remove email addresses (automatically removes any alias relationships).
+  [UpdateEmailAddressMetadata](https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdateEmailAddressMetadata.html): Modify email address properties (does not affect alias relationships).

## Request Syntax
<a name="API_DisassociateEmailAddressAlias_RequestSyntax"></a>

```
POST /email-addresses/InstanceId/EmailAddressId/disassociate-alias HTTP/1.1
Content-type: application/json

{
   "AliasConfiguration": { 
      "EmailAddressId": "string"
   },
   "ClientToken": "string"
}
```

## URI Request Parameters
<a name="API_DisassociateEmailAddressAlias_RequestParameters"></a>

The request uses the following URI parameters.

 ** [EmailAddressId](#API_DisassociateEmailAddressAlias_RequestSyntax) **   <a name="connect-DisassociateEmailAddressAlias-request-uri-EmailAddressId"></a>
The identifier of the email address.  
Length Constraints: Minimum length of 1. Maximum length of 500.  
Required: Yes

 ** [InstanceId](#API_DisassociateEmailAddressAlias_RequestSyntax) **   <a name="connect-DisassociateEmailAddressAlias-request-uri-InstanceId"></a>
The identifier of the Amazon Connect instance. You can [find the instance ID](https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html) in the Amazon Resource Name (ARN) of the instance.  
Length Constraints: Minimum length of 1. Maximum length of 100.  
Required: Yes

## Request Body
<a name="API_DisassociateEmailAddressAlias_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [AliasConfiguration](#API_DisassociateEmailAddressAlias_RequestSyntax) **   <a name="connect-DisassociateEmailAddressAlias-request-AliasConfiguration"></a>
Configuration object that specifies which alias relationship to remove. The alias association must currently exist between the primary email address and the specified alias email address.  
Type: [AliasConfiguration](API_AliasConfiguration.md) object  
Required: Yes

 ** [ClientToken](#API_DisassociateEmailAddressAlias_RequestSyntax) **   <a name="connect-DisassociateEmailAddressAlias-request-ClientToken"></a>
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](https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/).  
Type: String  
Length Constraints: Maximum length of 500.  
Required: No

## Response Syntax
<a name="API_DisassociateEmailAddressAlias_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_DisassociateEmailAddressAlias_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_DisassociateEmailAddressAlias_Errors"></a>

For information about the errors that are common to all actions, see [Common Errors](CommonErrors.md).

 ** AccessDeniedException **   
You do not have sufficient permissions to perform this action.  
HTTP Status Code: 403

 ** InternalServiceException **   
Request processing failed because of an error or failure with the service.    
 ** Message **   
The message.
HTTP Status Code: 500

 ** InvalidParameterException **   
One or more of the specified parameters are not valid.    
 ** Message **   
The message about the parameters.
HTTP Status Code: 400

 ** InvalidRequestException **   
The request is not valid.    
 ** Message **   
The message about the request.  
 ** Reason **   
Reason why the request was invalid.
HTTP Status Code: 400

 ** ResourceConflictException **   
A resource already has that name.  
HTTP Status Code: 409

 ** ResourceNotFoundException **   
The specified resource was not found.    
 ** Message **   
The message about the resource.
HTTP Status Code: 404

 ** ThrottlingException **   
The throttling limit has been exceeded.  
HTTP Status Code: 429

## Examples
<a name="API_DisassociateEmailAddressAlias_Examples"></a>

### Example 1: Basic alias removal
<a name="API_DisassociateEmailAddressAlias_Example_1"></a>

The following example removes the forwarding relationship between two email addresses. 

```
POST / HTTP/1.1
Host: connect.us-east-1.amazonaws.com
Content-Length: 156
X-Amz-Target: AmazonConnectService.DisassociateEmailAddressAlias
X-Amz-Date: 20170705T211529Z
Authorization: AWS4-HMAC-SHA256\
 Credential=AKIAI44QH8DHBEXAMPLE/20170705/us-east-1/connect/aws4_request,\
 SignedHeaders=content-type;host;x-amz-date;x-amz-target,\
 Signature=6bcb6a5ef9ee7585d83955e8a5c3f6d47cf581596208fc0e436fa1de26ef3f6a
Content-Type: application/x-amz-json-1.1
{
    "InstanceId": "12345678-1234-1234-1234-123456789012",
    "EmailAddressId": "87654321-4321-4321-4321-210987654321",
    "AliasConfiguration": {
        "EmailAddressId": "11111111-2222-3333-4444-555555555555"
    }
}
```

### Example 2: Alias removal with error handling
<a name="API_DisassociateEmailAddressAlias_Example_2"></a>

The following example response shows a safely removed alias with proper error handling for non-existent relationships.

```
HTTP/1.1 200 OK
Date: Wed, 05 Jul 2017 21:15:29 GMT
Content-Type: application/x-amz-json-1.1
Content-Length: 2
Connection: keep-alive
x-amzn-RequestId: 12345678-1234-1234-1234-123456789012
{}
```

## See Also
<a name="API_DisassociateEmailAddressAlias_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/connect-2017-08-08/DisassociateEmailAddressAlias) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/connect-2017-08-08/DisassociateEmailAddressAlias) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/connect-2017-08-08/DisassociateEmailAddressAlias) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/connect-2017-08-08/DisassociateEmailAddressAlias) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/connect-2017-08-08/DisassociateEmailAddressAlias) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/connect-2017-08-08/DisassociateEmailAddressAlias) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/connect-2017-08-08/DisassociateEmailAddressAlias) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/connect-2017-08-08/DisassociateEmailAddressAlias) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/connect-2017-08-08/DisassociateEmailAddressAlias) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/connect-2017-08-08/DisassociateEmailAddressAlias) 