Skip to main content
The Prophic integrations platform exposes two surfaces. The partner integrations API authenticates with an API key and is used by external systems to start and read Quick Quotes. The organization webhook configuration API authenticates with a normal session and is used to manage webhook endpoints from the app.
For a plain-language walkthrough, see the integrations overview. Interactive OpenAPI docs are served by the API at /api-docs.

Partner integrations API

Base path: /v1/integrations Auth: X-API-Key: pk_... header only. Keys in the query string are rejected with 400. Org scope: taken from the key. Client-supplied organization IDs are ignored.

Rate limits

Limits apply per API key:

Common errors

POST /v1/integrations/quotations

Start an async Quick Quote. Always non-blocking. Body (JSON or multipart): Either requirementsText or at least one file is required. Quotes started here set Quotations.source = api_key and store the api_key_id. Success: 202 Accepted
Example:

GET /v1/integrations/quotations/:id

Quotation summary for the key’s organization. Success: 200
The database field is source with values ui or api_key. Webhook lean payloads expose the same concept under generation_source.

GET /v1/integrations/quotations/:id/pipeline

Per-step pipeline status for the quotation. Returns the same shape as the internal pipeline status service. Success: 200 with a step list or progress object.

GET /v1/integrations/quotations/:id/proposal

Proposal metadata linked to the quotation. Success: 200

GET /v1/integrations/proposals/:id/document-url

Short-lived signed URL for the proposal document. Returns 404 if the proposal has no document_id yet. Success: 200

Organization webhook configuration API

Base path: /v1/organizations/:organizationId/webhooks Auth: session-based (Clerk), same as the app. Permission: manage_integrations on all routes.

GET /webhooks/events

Event catalog with descriptions and example payloads (used by the settings UI).

GET /webhooks/deliveries

Recent delivery attempts for the organization. Query parameters: Each attempt includes event_type, status, http_status, quotation_id, quotation_name (when resolvable), created_at, and related IDs.

GET /webhooks

List endpoints for the organization. Signing secrets are never included.

POST /webhooks

Create a webhook endpoint. Required body: name, url (HTTPS), events (non-empty array of catalog types). Optional: description, trigger_mode (headless_only or always), is_enabled. Success: endpoint object plus the one-time signing secret (whsec_...).

GET /webhooks/:id

Get one endpoint. The full secret is never returned.

PATCH /webhooks/:id

Update name, url, description, events, trigger_mode, and/or is_enabled.

DELETE /webhooks/:id

Soft-delete the endpoint. Historical delivery attempts remain available.

POST /webhooks/:id/rotate-secret

Issue a new signing secret. The response includes the new secret once.

POST /webhooks/:id/test

Send a signed sample lean payload for a subscribed event_type. Writes a delivery attempt row. Response includes a success flag, HTTP status, and optional error message.

Webhook event catalog

Stable event type strings delivered to partners: Future domains (for example project.*) can be added without renaming these strings.

Delivery HTTP headers

Delivery uses HTTPS only with a ~10 second timeout and exponential backoff (up to 8 attempts). HTTP 410 is treated as permanent failure. Delivery is at-least-once.

Trigger modes

API keys (session routes)

Partner keys are managed under the existing user API-key endpoints, not under /integrations:
  • Members can CRUD their own keys without manage_integrations.
  • Holders of manage_integrations can list and revoke any key in the organization.
The plaintext pk_... value is returned once at creation. After that only a masked form is shown. Keys support expiry, activate/deactivate, soft revoke, and last_used_at updates on successful authentication. UI: Account → API Keys. See API Keys for the full workflow.

Integrations Overview

Plain-language walkthrough of the end-to-end flow.

Webhooks

Signature verification and delivery details.