CorefinityCorefinityDocs
Open the Control PanelControl Panel
Password protection · 2 of 4

Get a site's HTTP authentication

Answers the rules that ask visitors for a login, their users and the version every save sends back. A password is never part of this answer.

GET/api/corestack/sites/{site}/http-auth

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Returns

200 The HTTP authentication set.

Fields of the 200 answer
applyobjectRequired

Whether a saved set of rules is live on the site.

Fields
applied_atstring or nullRequired
detailany

Sent only by the sets that have more to say, such as HTTP authentication.

errorstring or nullRequired
operationobject or any or nullRequired

The change that is applying the set, while one is running.

statestringRequired

Such as applied or applying.

state_labelstringRequired
bypass_corefinityintegerRequired

How many of Corefinity's own addresses are let past HTTP authentication.

bypass_ipsarray of stringsRequired

Always empty for you. Corefinity's own addresses are let past HTTP authentication and are told to Corefinity staff only; bypass_corefinity counts them.

default_for_rolebooleanRequired

Whether an environment with this role starts protected.

enabledbooleanRequired

Whether the whole environment asks for a login.

limitsobjectRequired
Fields
prefix_maxintegerRequired
rules_maxintegerRequired
users_per_rule_maxintegerRequired
notestringRequired
rulesarray of objectsRequired
Fields of each item
enabledbooleanRequired
idintegerRequired

At least 1.

path_prefixstring or nullRequired

The path the rule protects. Null for the whole environment.

sortintegerRequired
usersarray of objectsRequired
Fields of each item
created_atstring or nullRequired

Format: date-time.

idintegerRequired

At least 1.

password_setbooleanRequired
revealed_atstring or nullRequired

When the password was last revealed. Format: date-time.

usernamestringRequired
versionintegerRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404noneCheck the id. You see only what your account can reach.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/corestack/sites/1042/http-auth \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "apply": {
    "applied_at": "2026-11-06T15:01:10Z",
    "detail": {
      "credentials": "verified"
    },
    "error": null,
    "operation": null,
    "state": "applied",
    "state_label": "Applied"
  },
  "bypass_corefinity": 1,
  "bypass_ips": [],
  "default_for_role": true,
  "enabled": true,
  "limits": {
    "prefix_max": 200,
    "rules_max": 20,
    "users_per_rule_max": 10
  },
  "note": "Passwords are stored encrypted and shown only when you reveal them; every reveal is recorded.",
  "rules": [
    {
      "enabled": true,
      "id": 51,
      "path_prefix": null,
      "sort": 0,
      "users": [
        {
          "created_at": "2026-11-04T10:00:00Z",
          "id": 71,
          "password_set": true,
          "revealed_at": "2026-11-05T11:00:00Z",
          "username": "client"
        }
      ]
    },
    {
      "enabled": true,
      "id": 52,
      "path_prefix": "/wp-admin/",
      "sort": 1,
      "users": [
        {
          "created_at": "2026-11-04T10:00:00Z",
          "id": 72,
          "password_set": true,
          "revealed_at": null,
          "username": "editor"
        }
      ]
    }
  ],
  "version": 4
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT