> ## Documentation Index
> Fetch the complete documentation index at: https://developers.entri.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Power Endpoints

> REST endpoints for Entri Power.

<Note>
  Power endpoints are served by the Connect API gateway, not by a separate Power host.
</Note>

## Power API - Custom domains

### List powered domains

Partners can retrieve all domains currently **Powered** under a given `applicationId` to audit configuration, build admin UIs, and perform maintenance. This endpoint returns a paginated list of all Power-managed domains for the authenticated application.

```txt theme={null}
GET https://api.goentri.com/power
Header "Authorization: [JWT authorization]"
Header "applicationId: [yourApplicationID]"
```

#### Headers

| Header        | Required? | Description                                  |
| ------------- | --------- | -------------------------------------------- |
| Authorization | Yes       | Bearer token (JWT) for authentication.       |
| applicationId | Yes       | Your Application ID as set in the dashboard. |

#### Query string parameters

| Name   | Type    | Required? | Default | Description                                     |
| ------ | ------- | --------- | ------- | ----------------------------------------------- |
| page   | integer | No        | 0       | Zero-based page index (0 = first page).         |
| size   | integer | No        | 50      | Max number of items to return (range: 1–200).   |
| status | string  | No        | —       | Filter by power status: `active` or `inactive`. |

> **Note:** `status` is optional. If omitted, the endpoint returns **all** powered domains for the application.

#### Sample response

```json theme={null}
{
  "items": [
    {
      "domain": "www.example.com",
      "applicationUrl": "my.applicationurl.com",
      "powerRootPathAccess": ["/", "/shop"],
      "powerStatus": "active"
    },
    {
      "domain": "blog.example.com",
      "applicationUrl": "my.applicationurl.com",
      "powerRootPathAccess": [],
      "powerStatus": "inactive"
    }
  ],
  "total": 2,
  "page": 0,
  "limit": 50,
  "count": 2,
  "pages": 1,
  "nextPage": null,
  "prevPage": null
}
```

#### Field definitions

* **domain** (`string`): Fully qualified domain or subdomain configured via Power.
* **applicationUrl** (`string`): Current upstream URL for this domain.
* **powerRootPathAccess** (`string[]`): List of root paths with access granted (may be empty).
* **powerStatus** (`string`): `active` or `inactive`.
* **total** (`integer`): Total number of powered domains matching the filter.
* **page** (`integer`): Current zero-based page index.
* **limit** (`integer`): Maximum number of items requested per page.
* **count** (`integer`): Number of items returned.
* **pages** (`integer`): Total number of pages available.
* **nextPage** (`integer | null`): Next page index, or null if not applicable.
* **prevPage** (`integer | null`): Previous page index, or null if not applicable.

#### Error responses

| HTTP | Example Body                                 | When                                      |
| ---- | -------------------------------------------- | ----------------------------------------- |
| 400  | `{ "message": "Invalid 'limit' parameter" }` | Validation errors on query parameters.    |
| 401  | `{ "message": "Unauthorized" }`              | Missing/invalid JWT or `applicationId`.   |
| 403  | `{ "message": "Forbidden" }`                 | Authenticated but forbidden for this app. |
| 500  | `{ "message": "Internal Server Error" }`     | Unexpected server-side error.             |

#### Rate limits

This endpoint follows the same global rate limits as other Power API endpoints.

#### Example cURL

```bash theme={null}
curl -X GET "https://api.goentri.com/power?status=active&size=10&page=0 \
  -H "Authorization: Bearer <JWT>" \
  -H "applicationId: <yourApplicationID>"
```

### Check the domain's eligibility

```BASH theme={null}
GET https://api.goentri.com/power?domain=www.example.com&rootDomain=false
Header "Authorization: [JWT authorization]"
Header "applicationId: [yourApplicationID]"
```

#### Parameters description

| Parameter  | Required? | Default | Description                                                                       |
| ---------- | --------- | ------- | --------------------------------------------------------------------------------- |
| domain     | Yes       | N/A     | The domain name to check                                                          |
| rootDomain | No        | false   | true if checking the root domain's eligibilityfalse if checking for the subdomain |

#### Successful response (200 status)

```JSON JSON theme={null}
{
  // Is the domain CNAMEed to the cname_target of the application?
  "eligible": true | false,

  // Is the domain already powered?
  "powerStatus": "active" | "inactive",

  // Current cnameTarget set on the Dashboard
  "cnameTarget": URL | "",

  // Current cnameTarget value for the domain
  "applicationUrl": URL | "",

  //Paths with granted access to the root of the Application URL
  "powerRootPathAccess": [] | ["/path1", "/path2",..., "pathN"]
}
```

#### Possible error responses

Errors are returned as a `{message: 'string'}` object.

| Error message                         | Status |
| ------------------------------------- | ------ |
| Domain provided couldn't be resolved. | 400    |

***

### Power a new domain

```BASH theme={null}
POST https://api.goentri.com/power
Header "Authorization: [JWT authorization]"
Header "applicationId: [yourApplicationID]"
```

#### Request body

```JSON JSON theme={null}
{
  "domain": "www.example.com",
  "applicationUrl": "my.applicationurl.com"
}
```

<Note>
  Root Path Access is configured once in your application settings (Dashboard or Portal) and applied automatically to every powered domain. See [Root Path Access](/power/root-path-access).
</Note>

#### Successful response (200 status)

```JSON JSON theme={null}
{ "message": "Success." }
```

#### Possible error responses

Errors are returned as a `{message: 'string'}` object.

| Error message                                          | Status |
| ------------------------------------------------------ | ------ |
| This domain has been already powered.                  | 502    |
| Please review Power eligibility status of this domain. | 502    |
| Please complete step 1.                                | 502    |
| Internal Server Error.                                 | 502    |

***

### Update an already powered domain

```
PUT https://api.goentri.com/power
Header "Authorization: [JWT authorization]"
Header "applicationId: [yourApplicationID]"
```

#### Request body

```JSON JSON theme={null}
{
  "domain": "www.example.com",
  "applicationUrl": "my.applicationurl.com"
}
```

#### Successful response (200 status)

```JSON JSON theme={null}
{ "message": "Success." }
```

#### Possible error responses

Errors are returned as a `{message: 'string'}` object.

| Error message                                             | Status |
| --------------------------------------------------------- | ------ |
| `{detailed error message when powering again the domain`} | 502    |

***

### Remove a powered domain

```BASH theme={null}
DELETE https://api.goentri.com/power
Header "Authorization: [JWT authorization]"
Header "applicationId: [yourApplicationID]"
```

#### Request body

```JSON JSON theme={null}
{ "domain": "www.example.com" }
```

#### Successful response (200 status)

```JSON JSON theme={null}
{ "message": "Success." }
```

#### Possible error responses

Errors are returned as a `{message: 'string'}` object.

| Error message                                                          | Status |
| ---------------------------------------------------------------------- | ------ |
| Domain not valid                                                       | 502    |
| detailed error message when deleting the SSL certificate of the domain | 502    |

## Appended Headers on Incoming Traffic

As part of the SSL provisioning process, all incoming traffic will have specific headers appended to each request. These headers provide additional context about the original request, including information about the host and IP address. The following headers will be added automatically to every incoming request:

* **X-Forwarded-Host**: This header contains the original `Host` value of the incoming request before any proxy or load balancer has modified it. It helps in identifying the initial destination for the request.

* **x-entri-forwarded-host**: Similar to `X-Forwarded-Host`, this is a custom header used by Entri to track the original host at the time the request was forwarded through Entri’s system.

* **X-Forwarded-IP** or **X-Forwarded-For**: These headers contain the original IP address of the client making the request. It is useful for understanding where the request originated from, even if it passed through proxies or load balancers.

* **X-Entri-Auth**: The X-Entri-Auth header is a configurable authentication token that you can set in the Entri Dashboard. Once enabled, it is automatically included in every outgoing request, allowing your system to verify that the request originated from Entri. The token can be rotated at any time to align with your internal security policies.

These headers ensure that downstream services can access critical metadata about the request, facilitating better logging, security, and handling of the requests in your system.
