# Update an existing Power configuration

> Update an existing Power configuration: CustomDomain™ API reference in the power group. Covers request parameters, the request body, responses and error codes.

Source: https://docs.customdomain.ai/docs/api-reference/power/repowerConnection

## `POST https://api.customdomain.ai/v1/connections/{id}/power:repower`

Update the origin and/or config. Omitting `application_url` keeps the current origin (unlike enable, which requires it).

### Authentication

`widgetJWT`, `apiKey`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `application_url` | string | no | origin the edge proxies to; required to enable, optional to re-power (kept if omitted). |
| `www_redirect` | boolean | no |  |
| `redirect_to` | string | no | set to a URL to 301 the host there; "" clears it. |
| `root_path_access` | array of string | no |  |

### Responses

| Status | Description |
| --- | --- |
| `200` | Power updated |
| `400` | Error envelope: {code, title, details}. |
| `401` | Error envelope: {code, title, details}. |
| `404` | Error envelope: {code, title, details}. |
| `409` | `conflict`: the call changes a redirect or the root path access of a domain that is being removed. |
| `422` | `redirect_target_not_allowed` or `redirect_loop` for `redirect_to` or `www_redirect`: the same checks as `PATCH /connections/{id}`. |
| `503` | `redirects_busy`: another change to this workspace's forwarding is still being saved (redirect changes of one workspace are made one at a time), and this one waited for it in vain. Nothing was changed; send it again after the `Retry-After` seconds. `service_unavailable`: edge serving is off in this deployment, so a forward cannot be set. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `power` | object | no |  |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
