Roofpeace

Run a roofing company: jobs, claims, quotes, invoices, schedule and storm leads.

호스팅형 MCP 서버

npx add-mcp 'https://roofpeace.com/api/mcp'

Claude Code, Codex, Cursor 등에 설치됩니다

문서

Roofpeace agent API

Roofpeace is a roofing business operating backend. Muse and other agents use HTTPS JSON endpoints at https://roofpeace.com/api/v1; no browser login, UI automation, signup, or email approval is needed by an agent.

MCP server: https://roofpeace.com/api/mcp (streamable HTTP). Clients that support OAuth, such as Muse, Claude and ChatGPT, connect with no key: a company owner or admin signs in and approves. See MCP server below.

Search for Agents (no key): GET or QUERY https://roofpeace.com/.well-known/search?q={query} returns ranked Markdown snippets from Roofpeace's public docs, pricing, /about, blog articles, hail history and roofer directory. Public pages also support Accept: text/markdown content negotiation.

Start

  1. A company owner or admin visits /settings/agent-access, opens "API keys for developers", names the key, chooses view only or view and change, then creates it. Admins' keys work while they remain an admin. The company must already have an active plan or trial; activation happens at /onboarding/billing.
  2. The person who made it places the one-time rp_live_... key in the agent's secret store. Never put it in chat, URLs, source files, logs or research attachments.
  3. Read /api/v1/openapi.json. Send Authorization: Bearer <stored key>.
  4. Call GET /me. Verify org_id, company name, scopes, expires_at, and access_active. Stop on a company mismatch. GET /me remains available for a valid key even when company billing has expired.
  5. Perform only actions within the granted scopes and the person's task.

The agent needs ordinary HTTP access and secure secret storage, not a Roofpeace SDK, browser session or Muse-specific plugin. Use one key per agent so attribution and revocation remain independent.

Free roofing estimate PDF (no key)

POST https://roofpeace.com/api/estimate-template needs no account or key. Use the contractor's own prices; Roofpeace supplies none and does not save the estimate (one waiting to be emailed is kept until it is sent, at most a day). Without send_to the response is the PDF. With send_to it returns 202 JSON and emails that address a link; the PDF is sent once they tap "Send my estimate" (the link lasts a day). The confirmed address and company name are kept as a sales lead. Only send to someone who asked for it, and tell them about the follow-up.

curl -X POST https://roofpeace.com/api/estimate-template \
  -H "Content-Type: application/json" \
  -o roofing-estimate.pdf \
  -d '{"company":"Mesa Roofing","customer":"Pat Lee","address":"123 Main St",
       "lines":[{"description":"Install architectural shingles","quantity":24,
                 "unit":"square","price":425,"waste":10}],
       "tax_percent":8.25,"deposit_percent":50,"terms":"Net 15."}'
  • lines (required, up to 100): description, quantity, price, optional waste percent, and unit: square, linear ft, sheet, each (default) or load.
  • Optional: details, phone, email, tax_percent, deposit_percent, terms, date, send_to, and logo as a PNG or JPEG data URL.
  • Limits: 30 requests an hour per connection. Emails: 5 an hour per connection and 3 a day per address. Errors return JSON with detail: 422 for bad input, 429 with Retry-After when limited, and 502 if an email fails to send. An address that unsubscribed or complained gets 422.

Permissions and operations

All paths below are relative to /api/v1.

PermissionOperations
jobs:readGET /jobs; GET /jobs/{job_id}
jobs:writePOST /jobs; PATCH /jobs/{job_id}; PATCH /jobs/{job_id}/state
research:writePOST /research
workspace:readGET /service-areas; GET /buildings; GET /buildings/{building_id}; GET /strikes; GET /strikes/{strike_id}
workspace:writePOST /service-areas
crm:readGET /crm/pipeline; GET /crm/buildings/{building_id}/summary; GET /crm/inquiries/{inquiry_id}/summary
crm:writePOST /crm/buildings/{building_id}/notes; PATCH /crm/buildings/{building_id}/stage; POST /crm/inquiries/{inquiry_id}/notes; POST /crm/buildings/{building_id}/tasks; POST /crm/inquiries/{inquiry_id}/tasks
marketing:readGET /marketing/ads; GET /marketing/leads; GET /marketing/learning; GET /marketing/feedback; GET /marketing/feedback/{id}
marketing:draftPOST /marketing/ads/{ad_id}/revisions; PATCH /marketing/ad-revisions/{revision_id}; POST /marketing/ad-revisions/{revision_id}/comments

New keys default to read-only workspace/CRM/marketing/jobs access. Writes must be selected explicitly. Existing keys retain their existing scopes. Internal founder keys are separate, read-only, and cannot be issued by customers.

Directory profiles

Directory ownership is separate from company membership. An agent needs the explicit directory:write permission and a currently verified, unbanned delegated Roofpeace account. Verification is checked on every request. Existing keys do not receive this permission automatically. An approved claim is required for edits to each individual business; company access alone never grants directory ownership.

Use GET /api/directory?slug=overture-UUID to read your claim and approved fields. Use POST /api/directory with a JSON body and the same bearer key:

  • Claim: { "action": "claim", "slug": "overture-UUID", "id": "UUID", "evidence": "Your role and evidence (20-3000 characters)" }.
  • Edit: { "action": "edit", "slug": "overture-UUID", "id": "UUID", "revision": 0, "fields": { "business_name": "Name", "phone": "", "website": "", "business_type": "unknown", "description": "", "service_areas": "" } }.

Reuse the body id for retries. Read the current revision before submitting an edit. A 409 means the listing changed or another change is awaiting review. Business types are unknown, residential, commercial, both, supplier, and manufacturer. Claims and edits enter a private review queue. Agents cannot approve claims, publish edits, classify businesses, or resolve reports. New contact links remain hidden until a verified human reviewer corroborates them. The public search and business profiles remain available without an account.

MCP server

Roofpeace also serves the Model Context Protocol at https://roofpeace.com/api/mcp (streamable HTTP, stateless). MCP clients that support OAuth, such as Muse, connect without a key: the server's 401 points to /.well-known/oauth-protected-resource/api/mcp, and a company owner or admin signs in and chooses view-only or view-and-update access. Someone who runs more than one company picks which one. Clients register dynamically, use PKCE and send resource=https://roofpeace.com/api/mcp. Owners and admins disconnect the agent at /settings/agent-access. Other clients can use a key made there:

claude mcp add --transport http roofpeace https://roofpeace.com/api/mcp \
  --header "Authorization: Bearer $ROOFPEACE_AGENT_KEY"

Only tools allowed by the key's scopes are listed. Tool calls are recorded like API requests. Write tools take an idempotency_key; reuse it when retrying.

ToolScopePurpose
get_workspaceanyCompany and permissions
list_jobsworkspace:readList jobs
get_jobworkspace:readGet a job
list_invoicesworkspace:readList a job's invoices
list_supplementsworkspace:readList a job's supplements
get_quoteworkspace:readGet a job's quote
list_tasksworkspace:readList open tasks
list_teamworkspace:readList the team
add_job_notecrm:writeAdd a note to a job
add_job_taskcrm:writeAdd a task to a job
complete_taskcrm:writeComplete a task
create_jobcrm:writeCreate a job
search_emailsworkspace:readSearch emails
list_job_emailsworkspace:readList a job's emails and drafts
draft_job_emailcrm:writeSave an email draft on a job
list_job_filesworkspace:readList a job's files, photos, forms and measurements
list_appointmentsworkspace:readList appointments
set_job_stagecrm:writeMove a job to a stage
update_job_detailscrm:writeCorrect a job's address or customer
set_job_main_contactcrm:writeChoose a job's main contact
add_person_to_jobcrm:writePut someone on a job
set_agreement_statuscrm:writeSet a job's agreement status
search_workspaceworkspace:readSearch everything
set_claim_decisioncrm:writeSet what the carrier decided on a claim
ask_for_reinspectioncrm:writeAsk the carrier for a re-inspection
set_work_typecrm:writeMake a job insurance or retail
find_contactsworkspace:readFind contacts
get_contactworkspace:readGet a contact
add_contactcrm:writeAdd a contact
update_contactcrm:writeUpdate a contact
delete_jobcrm:writeDelete a job or quote
delete_taskcrm:writeDelete a task
delete_filecrm:writeDelete a file or photo
delete_contactcrm:writeDelete a contact
delete_leadcrm:writeDelete a lead
void_invoicecrm:writeVoid an invoice
list_deletedworkspace:readList deleted things
restore_deletedcrm:writeBring back something deleted
get_quickbooks_statusworkspace:readQuickBooks status
get_moneyworkspace:readMoney owed to the company
get_scheduleworkspace:readProduction schedule
list_paperworkworkspace:readSupplier paperwork waiting
list_notesworkspace:readList standalone notes
add_workspace_notecrm:writeAdd a standalone note
list_subcontractorsworkspace:readList subcontractors and balances
list_stockworkspace:readList shop stock and material orders
list_chat_threadsworkspace:readList team chat threads
read_chat_threadworkspace:readRead messages in a chat thread
list_licensesworkspace:readLicenses and insurance
start_license_renewalcrm:writeTrack a license or policy renewal
record_license_renewalcrm:writeRecord a renewed license or policy
get_todaycrm:readToday's calls and follow-ups
get_leadcrm:readOne website lead
list_storm_alertsworkspace:readRecent storm alerts
get_door_listworkspace:readRanked, routed door list for a storm alert
search_propertiesworkspace:readSearch ranked properties
get_propertyworkspace:readProperty detail
get_roof_codeworkspace:readRoof insulation code
record_door_outcomecrm:writeRecord a door outcome
add_follow_up_taskcrm:writeAdd a follow-up task
check_coverageanyCheck coverage
get_website_copymarketing:websiteRead website copy
edit_website_copymarketing:websiteEdit website copy
submit_researchresearch:writeSubmit sourced research

get_door_list and search_properties accept detail: "concise" | "detailed"; concise is the default. MCP also exposes reusable prompts (morning_briefing, catch_up_on_job, storm_door_plan) and read-only resources (roofpeace://workspace, roofpeace://today). On MCP write tools, idempotency_key is optional: pass one to safely retry after a timeout, or omit it for a one-shot write.

Return research

POST /research with Content-Type: application/json and a unique Idempotency-Key header:

{
  "observation": "The source describes a repeated manual handoff.",
  "source": "Interview or publication title",
  "received_on": "2026-09-22",
  "evidence_url": "https://example.com/source",
  "hypothesis": "Sharing the job record might reduce repeated entry.",
  "proposed_change": "Ask the team to validate this with a real job."
}

observation, source, received_on, and HTTP(S) evidence_url are required. Separate observed facts from hypotheses. No server fetch of that URL occurs. Findings are attributed to the agent and saved as new/pending in Marketing research. Agents cannot declare a reviewed outcome, overwrite human research, or qualify leads. Read them back through /marketing/feedback when granted marketing:read. To correct a finding, submit a new observation referencing it.

Reliable writes

Every REST mutation requires a stable Idempotency-Key header (1–100 characters). Retry the same method, path, key and JSON payload after a transport error; successful retries return the original result with Idempotent-Replay: true. Reusing the key with different data returns 409. Honor Retry-After for in-progress writes. Never change the idempotency key just to bypass an ambiguous failure. (On MCP write tools, idempotency_key is optional and gives the same replay protection when provided.)

POST /jobs (and the MCP create_job tool) accepts source: "customer" with customer_name or roof_address (no existing building or inquiry required, plus optional customer_phone, customer_email, title), or source: "property" (building_id + title), or source: "inquiry" (inquiry_id + title); optional assigned_operator_user_id must be a company member. PATCH /jobs/{id} edits title, stage, claim details and assignment; PATCH /jobs/{id}/state accepts { "state": "active" } and enforces allowed transitions. Read current records before editing and use returned IDs rather than inventing people, measurements, prices, conversations or completion claims.

For notes use { "body": "..." }. For tasks use title, optional details, due_at, and a verified assigned_operator_user_id. Omission leaves the task unassigned. Neither action sends a message.

Errors, renewal and revocation

  • 401: missing, expired or revoked key. Stop; ask the person who made it for a replacement.
  • 403: insufficient scope, disabled agent or changed ownership. Do not bypass it with browser cookies or owner credentials.
  • 402: inactive company. Give the owner /onboarding/billing; do not purchase a subscription or repeatedly retry work.
  • 404: unavailable/foreign record or unsupported endpoint.
  • 409: conflicting/replayed mutation or invalid transition; inspect before retrying.
  • 422: invalid inputs; correct the reported fields.
  • 429: honor Retry-After where returned and back off.

Owners can rotate or revoke at /settings/agent-access. Rotation invalidates all previous keys for that agent and issues a 90-day replacement. Initial expiry is 1–365 days (default 90). Lost keys cannot be recovered; rotate. Revocation rejects subsequent requests; it does not undo work already committed or cancel an in-flight request. A revoked agent stays disabled; create a new explicit grant to restore access.

No agent endpoint manages keys, billing, teammates, provider connections, signing approval/sends, or ad publication. Research submission does not approve or publish anything. Agents must not use UI automation to bypass these boundaries.

Legacy /enrollments, status/claim and email-approval routes return 410. They no longer send email, create companies or issue keys. Already-issued credentials continue to work until expired, rotated or revoked.