const res = await fetch("https://api.openrevenue.com/api/v1/projects", {
method: "POST",
headers: {
Authorization: `Bearer ${OPENREVENUE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "My Website", domain: "mysite.com" }),
})
const project = await res.json()
curl -X POST https://api.openrevenue.com/api/v1/projects \
-H "Authorization: Bearer openrevenue_your_key" \
-H "Content-Type: application/json" \
-d '{ "name": "My Website", "domain": "mysite.com" }'
{
"id": "7f3a9d12-bc45-4e89-a012",
"name": "My Website",
"domain": "mysite.com",
"createdAt": "2026-05-25T10:00:00.000Z"
}
Create project
Creates a new project. The domain is automatically normalized — protocols and paths are stripped.
POST
/
api
/
v1
/
projects
const res = await fetch("https://api.openrevenue.com/api/v1/projects", {
method: "POST",
headers: {
Authorization: `Bearer ${OPENREVENUE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "My Website", domain: "mysite.com" }),
})
const project = await res.json()
curl -X POST https://api.openrevenue.com/api/v1/projects \
-H "Authorization: Bearer openrevenue_your_key" \
-H "Content-Type: application/json" \
-d '{ "name": "My Website", "domain": "mysite.com" }'
{
"id": "7f3a9d12-bc45-4e89-a012",
"name": "My Website",
"domain": "mysite.com",
"createdAt": "2026-05-25T10:00:00.000Z"
}
The site’s domain, e.g. “mysite.com” or “https://mysite.com”.
Response
Errors
| Status | Error | Description |
|---|---|---|
400 | name and domain are required | The JSON body is missing a required field. |
400 | You already have a project for this domain | The authenticated user already owns an active project for the normalized domain. |
400 | {domain} is already added to another OpenRevenue account… | Another account already has an active project for this domain. |
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. |
const res = await fetch("https://api.openrevenue.com/api/v1/projects", {
method: "POST",
headers: {
Authorization: `Bearer ${OPENREVENUE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "My Website", domain: "mysite.com" }),
})
const project = await res.json()
curl -X POST https://api.openrevenue.com/api/v1/projects \
-H "Authorization: Bearer openrevenue_your_key" \
-H "Content-Type: application/json" \
-d '{ "name": "My Website", "domain": "mysite.com" }'
{
"id": "7f3a9d12-bc45-4e89-a012",
"name": "My Website",
"domain": "mysite.com",
"createdAt": "2026-05-25T10:00:00.000Z"
}
Was this page helpful?