> This page is for API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eon.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eon.io/_mcp/server.

# Reconnect Source AWS Organizational Unit

POST https://%7Baccount-domain%7D.console.eon.io/api/v1/projects/{projectId}/source-aws-organizational-units/{organizationalUnitId}/reconnect

Reconnects a previously disconnected AWS organizational unit and its descendant accounts to the given project.


Reference: https://docs.eon.io/api/api-reference/source-connections/source-aws-ous/reconnect-source-aws-organizational-unit

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `projectId` (string, required) — ID of the project whose AWS organizational unit you want to reconnect. You can get your project ID from the [API Credentials](https://console.eon.io/global-management/api-credentials) page in your global management console.
- `organizationalUnitId` (string, required) — Eon-assigned ID of the AWS organizational unit to reconnect.

## Response

### 200

AWS organizational unit reconnected.

- `organizationalUnit` (SourceAwsOrganizationalUnit, required) — The reconnected AWS organizational unit.

## Types

### SourceAwsOrganizationalUnit

- `id` (string, required) — Eon-assigned organizational unit ID.
- `roleArn` (string, required) — ARN of the role Eon assumes to access the organizational unit in AWS.
- `name` (string, required) — Organizational unit display name in Eon.
- `providerOrganizationalUnitId` (string, required) — AWS-assigned organizational unit ID.
- `providerManagementAccountId` (string, required) — AWS-assigned ID of the organization's management account.
- `status` (enum, required) — Connection status of the organizational unit. Only `CONNECTED` organizational units can have their accounts backed up.
  - Allowed values: `CONNECTED`, `DISCONNECTED`, `INSUFFICIENT_PERMISSIONS`, `ACCOUNT_STATUS_UNSPECIFIED`

## Examples

**Response**

```json
{
  "organizationalUnit": {
    "id": "fc495499-9796-5fc9-ade7-1ba924cbcc42",
    "roleArn": "arn:aws:iam::123412341234:role/EonSourceAccountRole",
    "name": "prod-eu organizational unit",
    "providerOrganizationalUnitId": "ou-a1b2-f6g7h111",
    "providerManagementAccountId": "123456789012",
    "status": "CONNECTED"
  }
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/projects/cc4fe8ee-0c62-56f2-9fda-f27bc7753e55/source-aws-organizational-units/72d29280-a0be-59df-b33c-59f9015606c3/reconnect"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/v1/projects/cc4fe8ee-0c62-56f2-9fda-f27bc7753e55/source-aws-organizational-units/72d29280-a0be-59df-b33c-59f9015606c3/reconnect';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://{account-domain}.console.eon.io/api/v1/projects/cc4fe8ee-0c62-56f2-9fda-f27bc7753e55/source-aws-organizational-units/72d29280-a0be-59df-b33c-59f9015606c3/reconnect")
  .header("Authorization", "Bearer <token>")
  .asString();
```