Developer API

Build on Civil Takeoff

Pull and push projects, customers, and annotations from your own systems. Same data your team sees in the dashboard, scoped to your organization, gated by an API key you control.

Authentication

Send your API key in the Authorization header. Keys are bound to one organization — they cannot read or write any other org's data.

curl https://app.civiltakeoff.com/api/v1/projects \
  -H "Authorization: Bearer cto_live_…"

Scopes

Pick the minimum scopes you need when you create a key. Two keys with different scopes can coexist (e.g. an MCP-only key separate from a server-to-server write key).

  • projects:readRead your projects, takeoff measurements, and annotations
  • projects:writeCreate new projects and update existing ones — status, dates, customers, and fields
  • crm:readRead your customer list, contacts, and vendor records
  • crm:writeAdd new customers and vendors, and update existing ones
  • correspondences:readRead call logs, emails, and notes on projects and CRM records
  • correspondences:writeRecord calls, emails, and notes on projects, customers, and vendors
  • audit:readSee who changed what and when across your organization
  • webhooks:manageSubscribe to event notifications delivered to a URL you control
  • mcp:accessLet Claude, Cursor, and other MCP-compatible AI assistants use this key

Endpoints (v1)

MethodPathScopeDescription
GET/api/v1/projectsprojects:readList projects in your org.
POST/api/v1/projectsprojects:writeCreate a project.
GET/api/v1/projects/:idprojects:readGet one project.
PATCH/api/v1/projects/:idprojects:writeUpdate a project.
GET/api/v1/webhookswebhooks:manageList webhook subscriptions.
POST/api/v1/webhookswebhooks:manageCreate a webhook subscription.
PATCH/api/v1/webhooks/:idwebhooks:manageUpdate a subscription.
DELETE/api/v1/webhooks/:idwebhooks:manageDelete a subscription.
POST/api/v1/mcpmcp:accessMCP JSON-RPC endpoint (used by Claude/Cursor).

MCP (Claude / Cursor)

Civil Takeoff hosts an MCP server at /api/v1/mcp. Add it to your MCP client with a key that includes mcp:access.

{
  "mcpServers": {
    "civiltakeoff": {
      "url": "https://app.civiltakeoff.com/api/v1/mcp",
      "headers": { "Authorization": "Bearer cto_live_…" }
    }
  }
}

Webhooks

Subscribe to events (e.g. project.created, project.updated) and we'll POST to your URL with an HMAC signature header. Verify with the signing secret returned at creation.

// Node.js — verify an inbound webhook
import crypto from 'crypto'

function verify(req, signingSecret) {
  const signature = req.headers['x-cto-signature']?.replace('sha256=', '')
  const expected = crypto
    .createHmac('sha256', signingSecret)
    .update(req.rawBody)  // raw bytes, not JSON.parse'd
    .digest('hex')
  return crypto.timingSafeEqual(
    Buffer.from(signature, 'hex'),
    Buffer.from(expected, 'hex')
  )
}

Rate limits

600 requests per minute per key (sliding window). Responses include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. Exceeding the limit returns a 429.

Change history

Every write through the API is recorded in your org's audit log with source = "api" and the originating key's identifier in metadata.api_key_id. Admins can review these from the organization page.