Brand evidence
Save page measurements
Saves page experience measurements (75th percentile) for a URL and device.
PUT /v2/brands/{brand_id}/evidence/{kind}/{key}
- Path
kindispage_experience.
Authentication and access
- Authentication
- Bearer API key
- Scopes
- audits:write
- Roles
- editor, owner, service
- Plans
- Optimizer, Analyzer
- Credits
- No credit charge.
Parameters
| Name | Where | Type | Required | Description |
|---|---|---|---|---|
brand_id | path | string (uuid) | Yes | |
key | path | string | Yes | Hash [canonical URL, device (default "ALL"), period_end] with prefix page_experience~. Use lowercase SHA-256 of compact UTF-8 JSON with no separator whitespace and literal Unicode. Express dates as YYYY-MM-DD. |
kind | path | "page_experience" | Yes |
Request body
{
"p75": {
"largest_contentful_paint": 2200
},
"period_end": "2026-11-24",
"period_start": "2026-10-28",
"url": "https://example.com/product"
}| Name | Type | Required | Description |
|---|---|---|---|
device | "ALL" | "PHONE" | "DESKTOP" | "TABLET" | No | |
p75 | object | Yes | |
p75.cumulative_layout_shift | number | null | No | |
p75.interaction_to_next_paint | number | null | No | |
p75.largest_contentful_paint | number | null | No | |
period_end | string (date) | Yes | |
period_start | string (date) | Yes | |
url | string | Yes |
Request examples
Set AEO_API_BASE_URL to https://api.aeoapi.dev and AEO_API_KEY to your server-side API key. Set the other environment variables to the values for your request.
Save the JSON request body as request.json. Replace sample IDs, revisions and other values with your own.
curl --fail-with-body -X PUT "$AEO_API_BASE_URL/v2/brands/$BRAND_ID/evidence/page_experience/$KEY" \
-H "Authorization: Bearer $AEO_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @request.jsonimport json
from pathlib import Path
from os import environ
from aeo_sdk import AeoClient
body = json.loads(Path("request.json").read_text())
with AeoClient(environ["AEO_API_KEY"], base_url=environ["AEO_API_BASE_URL"]) as client:
response = client.v2_put_brands_brand_id_evidence_kind_key(
brand_id=environ["BRAND_ID"],
key=environ["KEY"],
kind="page_experience",
body=body,
)
print(response.body)import { AeoClient } from "@aeoapi/aeo-sdk";
import { readFile } from "node:fs/promises";
const client = new AeoClient(process.env.AEO_API_KEY!, {
baseUrl: process.env.AEO_API_BASE_URL!,
});
const body = JSON.parse(await readFile("request.json", "utf8"));
const response = await client.v2PutBrandsBrandIdEvidenceKindKey(
process.env.BRAND_ID!,
process.env.KEY!,
"page_experience",
body,
);
console.log(response.body);Responses
HTTP 200
Successful Response
application/json
Response fields are listed below.
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | The requested result. See the fields below for its contents. |
data.all_vitals_good | boolean | null | Yes | |
data.device | string | Yes | |
data.metrics | object | Yes | |
data.metrics.[key] | object | No | Value for each key. |
data.period_end | string | Yes | |
data.period_start | string | Yes | |
data.source | "public_field_measurement" | "partner_field_measurement" | Yes | |
data.url | string | Yes | |
meta | object | Yes | Information about this response, including any warnings or pagination details. |
Errors
Read code and message in the error response. Keep request_id when you contact support.
- HTTP 400
invalid_request - HTTP 401
unauthenticated - HTTP 403
forbidden - HTTP 404
not_found - HTTP 422
validation_error - HTTP 429
rate_limited