Skip to main content

Making Your First Request

All API requests go to https://beta.renovatr.app/api/v1 and require an X-API-KEY header.

Check Your Identity

Verify your API key is working:

curl https://beta.renovatr.app/api/v1/me \
-H "X-API-KEY: your-api-key-here"

Response:

{
"data": {
"id": 1,
"email": "you@example.com",
"name": "Your Name"
}
}

List Deliverables

curl https://beta.renovatr.app/api/v1/projects/1/deliverables \
-H "X-API-KEY: your-api-key-here"

Create a Deliverable

curl -X POST https://beta.renovatr.app/api/v1/projects/1/deliverables \
-H "X-API-KEY: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"type": "task",
"title": "Install kitchen tiles",
"status": "pending",
"estimatedCost": 1500
}'

Response (201 Created):

{
"data": {
"id": 42,
"type": "task",
"title": "Install kitchen tiles",
"status": "pending",
"estimatedCost": 1500,
"revision": 1
}
}

JavaScript Example

const API_BASE = "https://beta.renovatr.app/api/v1";
const API_KEY = process.env.RENOVATR_API_KEY;

async function listDeliverables(projectId) {
const res = await fetch(`${API_BASE}/projects/${projectId}/deliverables`, {
headers: { "X-API-KEY": API_KEY },
});
const { data } = await res.json();
return data;
}

async function createDeliverable(projectId, deliverable) {
const res = await fetch(`${API_BASE}/projects/${projectId}/deliverables`, {
method: "POST",
headers: {
"X-API-KEY": API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify(deliverable),
});
const { data } = await res.json();
return data;
}

Response Format

All successful responses are wrapped in a data envelope:

{ "data": <result> }

Error responses use a different shape:

{ "error": "Error message", "details": {} }

See Error Handling for details.