> 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.

# Connect Restore Account

POST https://%7Baccount-domain%7D.console.eon.io/api/v1/projects/{projectId}/restore-accounts
Content-Type: application/json

Connects a restore account to the given project.


Reference: https://docs.eon.io/api/api-reference/restore-connections/restore-accounts/connect-restore-account

## 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 you want to connect the source account to. You can get your project ID from the [API Credentials](https://console.eon.io/global-management/api-credentials) page in your global management console.

### Headers

- `X-Action-Approval-Request-Id` (string, optional) — ID of an approved action request. Applicable only when the method is protected by an action approval policy and the action request has been approved.&nbsp; When used, the current API request must match the original request parameters. The approved action request can be executed only by the original requester.

### Body (application/json)

This endpoint expects a ConnectRestoreAccountRequest.

- `restoreAccountAttributes` (RestoreAccountAttributesInput, required) — Cloud-provider-specific configuration for the restore account.
- `name` (string, optional) — Account display name in Eon.

## Response

### 200

Restore account connected.

- `restoreAccount` (RestoreAccount, required) — Restore account.

### 201

Applicable only when the method is protected by an [action approval policy]. An action request was created in an initial state. The action request needs to be submitted for approval by passing its ID to [Submit Action Approval Request](https://docs.eon.io/api/api-reference/access-management/action-approvals/my-action-requests/create-action-approval-request). [action approval policy]: /api/using-the-api/action-approvals

- `actionApprovalRequest` (MPARequest, required) — Action request details.

## Errors

### 409 Conflict Error

Restore account already connected to the project.

- `any`

## Types

### RestoreAccountAttributesInput

- `cloudProvider` (enum, required) — Cloud provider. `PROVIDER_UNSPECIFIED` is supported only in responses.
  - Allowed values: `AWS`, `AZURE`, `GCP`, `MONGO_ATLAS`, `PROVIDER_UNSPECIFIED`
- `aws` (AwsRestoreAccountAttributesInput, optional) — AWS account configuration. Applicable if `cloudProvider` is set to `AWS`.
- `azure` (AzureRestoreAccountAttributesInput, optional) — Azure subscription configuration. Applicable if `cloudProvider` is set to `AZURE`.
- `gcp` (GcpRestoreAccountAttributesInput, optional) — GCP project configuration. Applicable if `cloudProvider` is set to `GCP`.

### RestoreAccount

- `id` (string, required) — Eon-assigned restore account ID.
- `providerAccountId` (string, required) — Cloud-provider-assigned account ID.
- `name` (string, required) — Account display name in Eon.
- `status` (enum, required) — Connection status of the AWS account, Azure subscription, or GCP project. Only `CONNECTED` restore accounts can be restored to. For an explanation of statuses, see [Restore Account Statuses](/data-protection/restoring/restore-accounts/restore-account-statuses).
  - Allowed values: `CONNECTED`, `DISCONNECTED`, `INSUFFICIENT_PERMISSIONS`, `ACCOUNT_STATUS_UNSPECIFIED`
- `restoreAccountAttributes` (RestoreAccountCloudAttributes, required) — Cloud provider-specific configuration for the restore account.
- `isRestoreAllowed` (boolean, required) — Whether the current role's restore destination limits permit restoring to the restore account.
- `providerAccountName` (string, optional) — Display name inherited from the cloud provider.
- `version` (AccountVersion, optional) — Details on the Eon permissions version and installation method.
- `connectedTime` (datetime, optional) — Date and time the account was connected to Eon.

### MPARequest

Action request details.

- `id` (string, required) — ID of the action request.
- `operation` (enum, required) — Operation that requires action approval before it can be completed.
  - Allowed values: `MPA_OPERATION_TYPE_UNSPECIFIED`, `MPA_OPERATION_ADD_RESTORE_ACCOUNT`, `MPA_OPERATION_RESTORE_RESOURCE`, `MPA_OPERATION_UPDATE_BACKUP_POLICY`, `MPA_OPERATION_DELETE_BACKUP_POLICY`, `MPA_OPERATION_CREATE_BACKUP_POLICY`
- `requesterEmail` (string, required) — Email address of the requester.
- `status` (enum, required) — Action request status. For an explanation of statuses, see [Action Request Statuses](/data-protection/account-administration/access-management/action-approvals/action-request-statuses).
  - Allowed values: `MPA_REQUEST_STATUS_UNSPECIFIED`, `CREATED`, `PENDING_APPROVAL`, `APPROVED`, `DENIED`, `EXPIRED_PENDING_APPROVAL`, `EXPIRED_APPROVED`, `EXECUTED`, `CANCELED_PENDING_APPROVAL`, `CANCELED_APPROVED`, `DISCARDED`
- `policyDetails` (list of MPARequestPolicyDetail, required) — List of the action request's approval rules. Each item contains the rule's configuration and approval progress.
- `createdTime` (datetime, required) — Time when the approval request was created.
- `requesterName` (string, optional) — Display name of the requester at the time the request was created.
- `comment` (string, optional) — Comment from the requester explaining why they want to perform the action.
- `approvalExpirationTime` (datetime, optional, nullable) — Deadline for gathering approvals. Omitted before the request is submitted or after it's discarded.
- `executionExpirationTime` (datetime, optional, nullable) — Deadline for completing the approved action. Set when the request is approved.
- `resolvedTime` (datetime, optional, nullable) — Time when the request reached a terminal state, such as executed, expired, canceled, denied, or discarded. Omitted while the request is still active.

### AwsRestoreAccountAttributesInput

AWS account configuration. Applicable if `cloudProvider` is set to `AWS`.

- `roleArn` (string, required) — ARN of the role Eon assumes to access the account in AWS.

### AzureRestoreAccountAttributesInput

Azure subscription configuration. Applicable if `cloudProvider` is set to `AZURE`.

- `tenantId` (string, required) — ID of the tenant the subscription belongs to.
- `subscriptionId` (string, required) — Subscription ID.
- `resourceGroupName` (string, optional) — Resource group name.
- `eonInternalResourceGroupName` (string, optional, default: eon-restore-internal-rg) — Resource group name for Eon's temporary internal resources.

### GcpRestoreAccountAttributesInput

GCP project configuration. Applicable if `cloudProvider` is set to `GCP`.

- `serviceAccount` (string, required) — Email address of the GCP service account Eon uses to access the project for restore operations.

### RestoreAccountCloudAttributes

- `cloudProvider` (enum, required) — Cloud provider. `PROVIDER_UNSPECIFIED` is supported only in responses.
  - Allowed values: `AWS`, `AZURE`, `GCP`, `MONGO_ATLAS`, `PROVIDER_UNSPECIFIED`
- `aws` (AwsRestoreAccountAttributes, optional) — AWS account configuration. Applicable if `cloudProvider` is set to `AWS`.
- `gcp` (GcpRestoreAccountAttributes, optional) — GCP project configuration. Applicable if `cloudProvider` is set to `GCP`.
- `azure` (AzureRestoreAccountAttributes, optional) — Azure subscription configuration. Applicable if `cloudProvider` is set to `AZURE`.

### AccountVersion

Details on the Eon permissions version and installation method.

- `installed` (string, required) — Currently installed permissions version.
- `installationMethod` (enum, optional, default: UNSPECIFIED) — Method used to deploy the cloud permissions. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `UNSPECIFIED`, `CLOUDFORMATION`, `TERRAFORM`, `BASH_SCRIPT`
- `latest` (string, optional) — Latest available permissions version.

### MPARequestPolicyDetail

- `requiredApprovals` (integer, required) — Count of approvals the rule requires.
- `currentApprovals` (integer, required) — Count of qualifying approvals received.
- `executionWindowHours` (integer, required) — After all required approvals are received, number of hours the requester has to complete the action.
- `approvalWindowHours` (integer, required) — After submitting the action request, number of hours allowed for gathering all required approvals.
- `description` (string, optional) — Rule description.
- `approverIdpId` (string, optional, nullable) — Eon-assigned ID of the SAML identity provider the approver group belongs to. Used in combination with `approverProviderGroupId`.
- `approverProviderGroupId` (string, optional, nullable) — Identity-provider-assigned ID of the group. Used in combination with `approverIdpId`.

### AwsRestoreAccountAttributes

AWS account configuration. Applicable if `cloudProvider` is set to `AWS`.

- `roleArn` (string, required) — ARN of the role Eon assumes to access the account in AWS.
- `organizationId` (string, optional) — Cloud-provider-assigned ID of the AWS organization the account belongs to.

### GcpRestoreAccountAttributes

GCP project configuration. Applicable if `cloudProvider` is set to `GCP`.

- `serviceAccount` (string, required)

### AzureRestoreAccountAttributes

Azure subscription configuration. Applicable if `cloudProvider` is set to `AZURE`.

- `tenantId` (string, required) — ID of the tenant the subscription belongs to.
- `subscriptionId` (string, required) — ID of the Azure subscription.
- `resourceGroupName` (string, optional) — Name of the Azure resource group to scope permissions to. When provided, restoring is limited to this specific resource group. When omitted, permissions are scoped to the subscription.
- `eonInternalResourceGroupName` (string, optional) — Name of the Eon internal resource group for temporary restore resources.
- `managementGroupId` (string, optional) — ID of the Azure management group the restore account is scoped to.

## Examples

### Example 1

**Request**

```json
{
  "restoreAccountAttributes": {
    "cloudProvider": "AWS"
  }
}
```

**Response**

```json
{
  "restoreAccount": {
    "id": "9b76a8a2-a918-57e6-94d5-0316ebab663c",
    "providerAccountId": "123412341234",
    "name": "prod-eu",
    "status": "CONNECTED",
    "restoreAccountAttributes": {
      "cloudProvider": "AWS",
      "aws": {
        "roleArn": "arn:aws:iam::123412341234:role/EonSourceAccountRole",
        "organizationId": "o-1234567890"
      },
      "gcp": {
        "serviceAccount": "string"
      },
      "azure": {
        "tenantId": "12345678-1234-1234-1234-123456789012",
        "subscriptionId": "12345678-1234-1234-1234-123456789012",
        "resourceGroupName": "my-resource-group",
        "eonInternalResourceGroupName": "eon-restore-internal-rg",
        "managementGroupId": "3eca9074-011f-5008-9605-a7ccf00aa93e"
      }
    },
    "isRestoreAllowed": true,
    "providerAccountName": "string",
    "version": {
      "installed": "1.0.0",
      "installationMethod": "TERRAFORM",
      "latest": "1.2.0"
    },
    "connectedTime": "2024-08-29T13:24:03Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/projects/733888d8-2573-5f9a-b81d-21f051d24fda/restore-accounts"

payload = { "restoreAccountAttributes": { "cloudProvider": "AWS" } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/v1/projects/733888d8-2573-5f9a-b81d-21f051d24fda/restore-accounts';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"restoreAccountAttributes":{"cloudProvider":"AWS"}}'
};

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/733888d8-2573-5f9a-b81d-21f051d24fda/restore-accounts")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"restoreAccountAttributes\": {\n    \"cloudProvider\": \"AWS\"\n  }\n}")
  .asString();
```

### Example 2

**Request**

```json
{
  "restoreAccountAttributes": {
    "cloudProvider": "AWS"
  }
}
```

**Response**

```json
{
  "actionApprovalRequest": {
    "approvalExpirationTime": "2026-05-05T03:00:05Z",
    "comment": "Removing a backup policy that has been replaced.",
    "createdTime": "2026-05-04T23:00:05Z",
    "executionExpirationTime": "2026-05-05T07:00:05Z",
    "id": "018f3b3f-4818-7c31-a0d7-2e02f2f83a10",
    "operation": "MPA_OPERATION_DELETE_BACKUP_POLICY",
    "policyDetails": [
      {
        "approvalWindowHours": 24,
        "approverIdpId": "018f3b3f-4818-7c31-a0d7-2e02f2f83a31",
        "approverProviderGroupId": "platform-admins",
        "currentApprovals": 1,
        "description": "Require approval before deleting backup policies.",
        "executionWindowHours": 4,
        "requiredApprovals": 2
      }
    ],
    "requesterEmail": "requester@example.com",
    "requesterName": "Riley Chen",
    "resolvedTime": "2026-05-05T02:10:12Z",
    "status": "PENDING_APPROVAL"
  }
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/projects/733888d8-2573-5f9a-b81d-21f051d24fda/restore-accounts"

payload = { "restoreAccountAttributes": { "cloudProvider": "AWS" } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/v1/projects/733888d8-2573-5f9a-b81d-21f051d24fda/restore-accounts';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"restoreAccountAttributes":{"cloudProvider":"AWS"}}'
};

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/733888d8-2573-5f9a-b81d-21f051d24fda/restore-accounts")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"restoreAccountAttributes\": {\n    \"cloudProvider\": \"AWS\"\n  }\n}")
  .asString();
```