CorefinityCorefinityDocs
Open the Control PanelControl Panel
Performance audits · 5 of 14

Update a performance audit

Changes the fields sent, as the audit's edit form does in the Control Panel, including the shared report's sections, username and password; the saved results stay until the audit runs again. Changing the protection, the username or the password signs out everyone who unlocked the link before. Only the shared report's settings can be changed while a run is queued or running.

PATCH/api/performance-audits/{audit}

Path parameters

auditintegerRequired

The id of an audit. Digits only. At least 1.

Body

domainsarray of objects

The environments to test, replacing the whole list. A domain that leaves out http_username or http_password keeps the one saved for the environment of that name; send an empty string to remove it. Up to 10 items.

Fields of each item
environmentstringRequired

A name for the environment, unique in the audit, such as Current host. No control characters. Up to 100 characters.

http_passwordstring or null

The HTTP authentication password. No control characters. Never answered. Up to 255 characters.

http_usernamestring or null

The HTTP authentication username that opens a protected site for the runs. No control characters. Never answered. Up to 255 characters.

urlstringRequired

The address it is served on, a full http or https URL. No control characters. Up to 255 characters.

namestring

Up to 255 characters.

number_of_requestsinteger

1 to 20.

page_typesarray of objects

The pages to test, replacing the whole list. Up to 20 items.

Fields of each item
check_cacheboolean

Also test the page cached.

pathstring or null

The path of the page, such as /shop/. No control characters. Up to 255 characters.

titlestringRequired

A name for the page, unique in the audit. No control characters. Up to 100 characters.

report_passwordstring or null

10 to 72 characters and at most 72 bytes, no NUL character, not only spaces. Never answered; leave it out to keep the one set.

report_password_protectedboolean

Whether the shared link asks for a username and password first. Turning it on needs both, sent now or set before.

report_sectionsarray of objects

The shared report's sections in order. The headline always stays first and the contact block last; a section left out keeps its place and whether it shows. Up to 19 items.

Fields of each item
enabledbooleanRequired
keystringRequired
heroat_a_glanceresponse_timesgapimprovementabsolute_timeswaterfallfilmstripfull_tablegoogle_scoresdefinitionsmethodtiming_breakdownsamplesstatus_codesresponse_headersraw_lighthouse_jsonall_metricscta
report_usernamestring or null

The username the shared link asks for. No control characters. Up to 64 characters.

server_locationinteger

The id of the server location to test from, as an audit answers it in server_location.id.

user_agentstring

The user agent the requests carry. No control characters. Up to 255 characters.

Returns

200 The audit, without its results.

Fields of the 200 answer
company_idinteger or nullRequired

At least 1.

created_atstring or nullRequired

Format: date-time.

domainsarray of objectsRequired
Fields of each item
environmentstringRequired
http_authbooleanRequired

Whether an HTTP authentication username or password is set.

urlstringRequired
idintegerRequired

At least 1.

namestringRequired
number_of_requestsintegerRequired
page_typesarray of objectsRequired
Fields of each item
check_cachebooleanRequired
pathstring or nullRequired
titlestringRequired
reportobjectRequired

The shared report's state. It never holds the link itself or the password.

Fields
frozen_atstring or nullRequired

When the figures the link shows were built. Format: date-time.

legacy_link_livebooleanRequired

Whether a link made before the report existed still shows its response times and statuses.

password_protectedbooleanRequired
revoked_atstring or nullRequired

Format: date-time.

sectionsarray of objectsRequired
Fields of each item
enabledbooleanRequired
keystringRequired
heroat_a_glanceresponse_timesgapimprovementabsolute_timeswaterfallfilmstripfull_tablegoogle_scoresdefinitionsmethodtiming_breakdownsamplesstatus_codesresponse_headersraw_lighthouse_jsonall_metricscta
labelstringRequired
tabstringRequired
simpletechnicalboth
sharedbooleanRequired

Whether the report link works.

shared_atstring or nullRequired

Format: date-time.

usernamestring or nullRequired

The username the link asks for. Null while it is not protected.

runobjectRequired

The last run started through the API or MCP.

Fields
errorstring or nullRequired

Why a failed run failed.

finished_atstring or nullRequired

Format: date-time.

requested_atstring or nullRequired

Format: date-time.

started_atstring or nullRequired

Format: date-time.

statusstring or nullRequired

Null for an audit never run through the API.

queuedrunningcompletedfailednull
server_locationobject or any or nullRequired

Where the runs are made from. Null when the location no longer exists.

updated_atstring or nullRequired

Format: date-time.

user_agentstringRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403scope_requiredUse a token with the scope named in scope.
404noneCheck the id. You see only what your account can reach.
409run_in_progressThe audit is running. Wait for it to finish.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X PATCH https://manage.corefinity.com/api/performance-audits/5210 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "report_password": "made-up-report-password",
    "report_password_protected": true,
    "report_sections": [
      {
        "enabled": false,
        "key": "definitions"
      }
    ],
    "report_username": "client"
  }'
{
  "company_id": 1204,
  "created_at": "2026-11-01T09:00:00+00:00",
  "domains": [
    {
      "environment": "Current host",
      "http_auth": false,
      "url": "https://old.harbourandfinch.example.org"
    },
    {
      "environment": "Corefinity",
      "http_auth": true,
      "url": "https://harbourandfinch-example-com.northwind.cfstack.example.net"
    }
  ],
  "id": 5210,
  "name": "Before and after the move",
  "number_of_requests": 10,
  "page_types": [
    {
      "check_cache": true,
      "path": "/",
      "title": "Home"
    },
    {
      "check_cache": false,
      "path": "/shop/",
      "title": "Category"
    }
  ],
  "report": {
    "frozen_at": null,
    "legacy_link_live": false,
    "password_protected": false,
    "revoked_at": null,
    "sections": [
      {
        "enabled": true,
        "key": "hero",
        "label": "Headline",
        "tab": "simple"
      },
      {
        "enabled": true,
        "key": "at_a_glance",
        "label": "At a glance",
        "tab": "simple"
      },
      {
        "enabled": true,
        "key": "response_times",
        "label": "Response times",
        "tab": "simple"
      },
      {
        "enabled": true,
        "key": "gap",
        "label": "The gap, measurement by measurement",
        "tab": "simple"
      },
      {
        "enabled": true,
        "key": "improvement",
        "label": "Improvement per measurement",
        "tab": "simple"
      },
      {
        "enabled": true,
        "key": "absolute_times",
        "label": "Absolute times, side by side",
        "tab": "simple"
      },
      {
        "enabled": true,
        "key": "waterfall",
        "label": "Where the time actually goes",
        "tab": "simple"
      },
      {
        "enabled": true,
        "key": "filmstrip",
        "label": "Loading filmstrip",
        "tab": "simple"
      },
      {
        "enabled": true,
        "key": "full_table",
        "label": "The full table",
        "tab": "simple"
      },
      {
        "enabled": true,
        "key": "google_scores",
        "label": "Google scores",
        "tab": "simple"
      },
      {
        "enabled": true,
        "key": "definitions",
        "label": "Definitions",
        "tab": "simple"
      },
      {
        "enabled": true,
        "key": "method",
        "label": "Method",
        "tab": "technical"
      },
      {
        "enabled": true,
        "key": "timing_breakdown",
        "label": "Timing breakdown",
        "tab": "technical"
      },
      {
        "enabled": true,
        "key": "samples",
        "label": "Individual samples",
        "tab": "technical"
      },
      {
        "enabled": true,
        "key": "status_codes",
        "label": "Status codes and redirect chains",
        "tab": "technical"
      },
      {
        "enabled": true,
        "key": "response_headers",
        "label": "Response headers",
        "tab": "technical"
      },
      {
        "enabled": true,
        "key": "raw_lighthouse_json",
        "label": "Raw Lighthouse response",
        "tab": "technical"
      },
      {
        "enabled": true,
        "key": "all_metrics",
        "label": "Every available metric",
        "tab": "technical"
      },
      {
        "enabled": true,
        "key": "cta",
        "label": "Contact Corefinity",
        "tab": "both"
      }
    ],
    "shared": false,
    "shared_at": null,
    "username": null
  },
  "run": {
    "error": null,
    "finished_at": "2026-11-03T12:35:00+00:00",
    "requested_at": "2026-11-03T12:30:00+00:00",
    "started_at": "2026-11-03T12:30:00+00:00",
    "status": "completed"
  },
  "server_location": {
    "id": 12,
    "name": "London"
  },
  "updated_at": "2026-11-03T12:35:00+00:00",
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"
}
Try it

Try it is off for this endpointIt has not been cleared for the console. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT