Connect API
OAuth for consent, a Bearer token for uploads and links, HMAC webhooks when someone reads the brochure. PrepCRM is one client; anything that can redirect and POST JSON works the same way.
In a Prepinfo workspace open Settings → CRM connection and generate a client ID and secret. Add your CRM’s callback URL (for PrepCRM that is /api/prepinfo/callback). Paste the three values into the CRM.
Prefill org_name, slug, email and name so they can create a workspace in the same step.
https://prepseed.com/connect/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=https://yourapp.com/callback&state=CSRF&scope=documents%3Awrite%20links%3Awrite%20analytics%3Aread%20webhooks%3Awrite
POST https://prepseed.com/api/oauth/token with grant_type=authorization_code, code, client_id, client_secret, redirect_uri. You get access_token, org_id, org_slug. Store the token; it is shown once.
Header Authorization: Bearer pi_live_…
Events: link.opened, session.updated, link.revoked. Header X-Prepinfo-Signature: t=unix,v1=hmac_sha256(secret, t.body). Reject if |now − t| > 5 minutes. Match a reader to your CRM row with data.external_id, else phone/email on data.recipient.
Scopes: documents:write, links:write, analytics:read, webhooks:write. Tenant is always the token — never an org id in the body.