const res = await fetch("https://api.openrevenue.com/api/v1/projects/example.com", {
method: "PATCH",
headers: {
Authorization: `Bearer ${OPENREVENUE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "Example", publicStatsEnabled: true }),
})
const updated = await res.json()
curl -X PATCH "https://api.openrevenue.com/api/v1/projects/example.com" \
-H "Authorization: Bearer openrevenue_your_key" \
-H "Content-Type: application/json" \
-d '{ "name": "Example", "publicStatsEnabled": true }'
{
"id": "44cc0aa0-912f-4067-83c7",
"name": "Example",
"domain": "example.com",
"timeZone": "Africa/Casablanca",
"publicStatsEnabled": true,
"installationSeenAt": "2026-05-01T12:00:00.000Z"
}
Update project
Updates project settings. Requires a write-scoped API key and project ownership. Pass any combination of name, timeZone, and publicStatsEnabled.
PATCH
/
api
/
v1
/
projects
/
{domain}
const res = await fetch("https://api.openrevenue.com/api/v1/projects/example.com", {
method: "PATCH",
headers: {
Authorization: `Bearer ${OPENREVENUE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "Example", publicStatsEnabled: true }),
})
const updated = await res.json()
curl -X PATCH "https://api.openrevenue.com/api/v1/projects/example.com" \
-H "Authorization: Bearer openrevenue_your_key" \
-H "Content-Type: application/json" \
-d '{ "name": "Example", "publicStatsEnabled": true }'
{
"id": "44cc0aa0-912f-4067-83c7",
"name": "Example",
"domain": "example.com",
"timeZone": "Africa/Casablanca",
"publicStatsEnabled": true,
"installationSeenAt": "2026-05-01T12:00:00.000Z"
}
Response
Errors
| Status | Error | Description |
|---|---|---|
400 | No valid fields to update | The body had no recognized fields, or values failed validation. |
401 | Invalid or missing API key | The Authorization header is missing or the Bearer token is invalid. |
403 | API key is read-only | The key does not include the write scope. |
404 | Project not found | No project with that domain exists for the owner, or the caller is not the owner. |
429 | Too many requests | Rate limit exceeded. |
const res = await fetch("https://api.openrevenue.com/api/v1/projects/example.com", {
method: "PATCH",
headers: {
Authorization: `Bearer ${OPENREVENUE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "Example", publicStatsEnabled: true }),
})
const updated = await res.json()
curl -X PATCH "https://api.openrevenue.com/api/v1/projects/example.com" \
-H "Authorization: Bearer openrevenue_your_key" \
-H "Content-Type: application/json" \
-d '{ "name": "Example", "publicStatsEnabled": true }'
{
"id": "44cc0aa0-912f-4067-83c7",
"name": "Example",
"domain": "example.com",
"timeZone": "Africa/Casablanca",
"publicStatsEnabled": true,
"installationSeenAt": "2026-05-01T12:00:00.000Z"
}
Was this page helpful?