# Outlevo > Outlevo gets B2B companies meetings on autopilot, and every email is backed by real research. Paste a website and it learns the business, finds the buyers, researches each account from its own pages (every fact quoted with its source and date), writes and sends the emails, follows up, books the meetings and updates HubSpot or Salesforce; the same accounts become LinkedIn and Google ad audiences. Safe by default: daily sending limits, customers and unsubscribes suppressed, a kill switch; approval steps are optional for teams. Free ICP assessment in 60 seconds at https://outlevo.com, no sign-up, no card. Build on it with the REST API or the MCP server: API calls and MCP tools research, qualify and propose, and Outlevo itself does the sending (app.outlevo.com). Longer version with every quickstart and the approval gates: https://developers.outlevo.com/llms-full.txt. Rules for coding agents: https://developers.outlevo.com/AGENTS.md. ## Before you write code: which integration is this? Outlevo is used in two ways, and they differ in where the key lives and who ever sees Outlevo. Decide which one this is before writing anything. 1. **Outlevo works for your own company (the usual case).** Your product finds, researches and emails its *own* prospects through one Outlevo workspace: yours. One live key for the whole installation, in a server env var or your platform's admin settings; never a key per user, per customer or per account. Your users and customers never see Outlevo: no "Connect Outlevo", no Outlevo key field, no Outlevo name in your customer-facing screens, help, emails or privacy page. The usual shape: your app pushes the companies it found (`external_id` = your id, `attributes` = what you know about them), Outlevo qualifies them, finds the person, writes and sends, and webhooks bring replies and meetings back to your admin screens. 2. **Your users bring their own Outlevo workspace.** Each of your customers has an Outlevo account and pastes their own key into your app, which then works on their workspace. Build this only when the product's owner asks for exactly that. When the request is ambiguous, it is case 1: "use Outlevo to find our customers", "add Outlevo outbound to our admin" are case 1. Every key acts on one workspace, and in case 1 that workspace is yours; a feature documented "with the workspace's key" (ads, audiences) does not make it case 2. Outlevo gives your product no access to your customers' ad accounts, CRMs or mailboxes. If your product itself needs your customers' Google Ads, Meta or another platform (to exclude bot IPs from their campaigns, to send their conversions), integrate that platform directly with your own OAuth app. Outlevo's platform access covers Outlevo workspaces only. In case 1, when the product's owner wants to work from their own admin panel (chat, what needs a person, campaigns, replies), follow https://developers.outlevo.com/quickstarts/admin-console.md: which screens to build, what stays in app.outlevo.com, and why the browser never chooses what your key calls. ## Rules for code you generate - Base URL: https://api.outlevo.com. Auth: `Authorization: Bearer `. Keys: `olv_test_…` (sandbox) and `olv_live_…`. - Live keys are server-side only. A browser request with a live key is refused (403 LIVE_KEY_BROWSER_ORIGIN). Put the key in a server env var (OUTLEVO_KEY), never in frontend code, never in git. - Every POST/PUT/PATCH needs an `Idempotency-Key` header (a fresh UUID per operation; reuse it on retries). A retry with the same key and body replays the first answer (`Idempotent-Replayed: true`). - Metered calls quote first: call without `?confirm=true` to get `{ credit_estimate }`, then call again with `?confirm=true`. Slow work returns 202 `{ job_id }`; poll GET /v1/jobs/{id} or subscribe to webhooks. - Errors: `{ "error": { "code", "message", "fix", "details"?, "request_id" } }`. `fix` says what to do next; `details` carries ids (e.g. `company_id` of a company that already exists). - Lists are newest first and paged: `?limit=` (max 500) and `?cursor=`; the answer is `{ data, next_cursor }`, and `next_cursor` is null on the last page. - Rate limits per key: 20 requests a second and 600 a minute. Every keyed response has `RateLimit-Remaining` and `RateLimit-Reset` (seconds); a 429 has `Retry-After`. - Test keys act in your sandbox: 100 fake companies on `sbx-001.example` … `sbx-100.example`, fake contacts, five Readiness Cards, two fake mailboxes (`GET /v1/mailboxes`), an approved outbound policy, a draft campaign to set messages on, and a sending campaign with fake leads behind its stats and lead list (building and starting need a real Smartlead account). Campaign writes need a key with "Acts as me". No vendors, no credits; jobs finish after ~3 s. Sandbox webhooks are signed with `whsec_sandbox_outlevo_test_only_000000`. Test keys can also rehearse writes: companies (create, bulk, PATCH), contacts, evidence (url or note; not fetched), signals, revenue actions, campaigns and webhooks. - Libraries: `npm install https://developers.outlevo.com/outlevo-sdk-0.4.0.tgz` (TypeScript client for servers: Node 18+, Bun, Deno, edge) and `npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz` (React and Web Components, fed through your own server route). @outlevo/sdk 0.4.0 and @outlevo/components 0.3.0 are coming to npm; until then they install from the developer hub, and the import is the same. npm still has 0.2.0, without the assistant. Any other language calls the REST API directly; PHP/Laravel examples are below. ## Chat-first: let your users run outbound by talking to it The same assistant as app.outlevo.com, in your app: one endpoint that answers in plain language and does the work with your key's own scopes. It keeps a thread per workspace and per campaign, so a conversation carries on across calls and across your app and the Outlevo portal. - `POST /v1/assistant/messages { message, campaign_id?, page? }` (scope `assistant:write`, plus the scopes of the work you want it to do, e.g. `companies:write`). JSON by default; send `Accept: text/event-stream` to stream it (events: start, delta, status, event, widget, choices, link, done). - The answer: `{ thread, message_id, reply, cards, choices, links, events, approvals }`. - `reply`: the assistant's text. `choices`: suggested answers; show them as buttons and keep a free-text box ("Something else? Type it here…"). - `cards`: `table` (columns, rows) to render; `confirm` (title, detail, `credits`, `calls`, `done_text`): run its `calls` only after your user presses Confirm, then `POST /v1/assistant/messages/{message_id}/cards/{index}/done { text: done_text }`; `form` (smartlead_key, csv_import) and `launch` (campaign_id): open them in app.outlevo.com, because secrets and starting a campaign stay there; `chart` (series). - `events`: what changed; an event with `undoable: true` can be reversed with `POST /v1/assistant/events/{id}/undo`. - `links`: Outlevo pages, relative to https://app.outlevo.com. - `GET /v1/assistant/thread?campaign_id=` reads the conversation (scope `assistant:read`). - It never approves, starts or sends, and never spends credits on its own: work that costs credits comes back as a confirm card. With a test key it works in your sandbox. - TypeScript: `ol.assistant.send(message, { campaignId })`, `ol.assistant.confirm(messageId, index, card)`, `ol.assistant.undo(eventId)`. React: ``. Web Components: ``. MCP: the `ask_outlevo` tool. ```ts const a = await ol.assistant.send('Add acme.com and qualify it'); // a.reply: "Added acme.com. Qualifying costs 3 credits; it starts when you confirm." // a.cards[0]: { type: 'confirm', title: 'Qualify 1 account', credits: 8, calls: [...] } if (await userAgrees(a.cards[0])) await ol.assistant.confirm(a.message_id!, 0, a.cards[0]); ``` ## Keys and who can do what - Keys are created in the portal: app.outlevo.com → Developers. Only an owner or admin can create one. A live key also needs a second factor in the last 12 hours, scopes, and three spend caps (credits per day, per month, and per call). - Scopes are `:read` / `:write` (companies, contacts, signals, campaigns, handoffs, revenue_actions, context, icp, jobs, outcomes, assistant, …) plus `research:run`, `webhooks:manage` and `ledger:read`. - A key without "Acts as me" acts as a developer: it can read, create companies, contacts, signals and evidence, and propose revenue actions. Campaign writes (create, set messages, add leads, build, pause) and accepting or rejecting handoffs need a person's role, so use a key with "Acts as me", created by a member who has the rep, sales_approver, marketing_approver, admin or owner role. Such a key stops working when that membership ends. ## Quickstart (sandbox) ```bash export OUTLEVO_KEY=olv_test_... # app.outlevo.com → Developers → New test key curl -s https://api.outlevo.com/v1/companies -H "authorization: Bearer $OUTLEVO_KEY" # pick an unresearched company (status null), e.g. sbx-002.example, then: curl -s -X POST "https://api.outlevo.com/v1/companies/$ID/qualify" -H "authorization: Bearer $OUTLEVO_KEY" -H "idempotency-key: $(uuidgen)" curl -s -X POST "https://api.outlevo.com/v1/companies/$ID/qualify?confirm=true" -H "authorization: Bearer $OUTLEVO_KEY" -H "idempotency-key: $(uuidgen)" curl -s "https://api.outlevo.com/v1/jobs/$JOB_ID" -H "authorization: Bearer $OUTLEVO_KEY" ``` ## Keeping your companies in step (integrators) - Create: `POST /v1/companies { domain, name?, country?, employees?, external_id?, attributes? }`. `external_id` is your own id (unique per organization). `attributes` is a flat map of your data: keys are lowercase `a-z0-9_` (≤ 40 characters, ≤ 50 keys), values are strings, numbers or booleans, stored as text (1500 → "1500", true → "true"), as merge tags use them. - A company that already exists answers 409 `COMPANY_EXISTS` with `error.details.company_id`; an `external_id` already on another company answers 409 `EXTERNAL_ID_TAKEN`, also with `details.company_id`. - Find again: `GET /v1/companies?external_id=…`, `?domain=…`, `?status=…`, `?updated_since=`. - Buying signals ("why now"): `GET /v1/companies/{id}` carries `signals` (hiring, funding, new_leader, launch, tech_change), each with the `quote` read on `source_url`, `published_at`, `fresh_until` and `fresh`; `GET /v1/companies?has_signal=true` or `?signal_type=hiring` lists only accounts with a fresh one, each row with its best as `why_now`. A signal counts for 60 days (hiring), 120 (funding) or 90 (the rest). `GET /v1/campaigns/{id}/signals` (scope `campaigns:read`) lists a campaign's accounts with a fresh signal and the `{{why_now}}` opener their first email gets. - Update: `PATCH /v1/companies/{id}` with any of name, website_url, country, employees, business_model, industry_naics, relationship, external_id, attributes. Attributes merge into what is there; send a key as `null` to remove it. The domain cannot change. - Bulk: `POST /v1/companies/bulk { records: [{ domain, external_id?, attributes?, … }] }` (≤ 1,000 per call; 202 with `job_id`). Attributes merge into existing companies. - Signals: `POST /v1/signals { company_id, source, type, weight 0–100, observed_at, url?, data? }`. `url` links to what the signal is about (a report, a page); `data` holds its numbers. Repeats from one source within 7 days count once. ## Outbound with your data (merge tags) - Messages may use `{{first_name}}`, `{{last_name}}`, `{{email}}`, `{{company_name}}`, `{{website}}`, `{{job_title}}`, and company attributes that the approved outbound policy lists in `merge_fields` (e.g. `"merge_fields": ["pages_exposed", "report_url"]`). - A field can also be declared as an object, so the AI that writes the emails knows what it is: `{ "key": "report_url", "description": "Link to a free draft of the company's sub-processor list, built from its own website", "kind": "url", "use": "first_email", "example": "https://example.com/r/x7k2" }`. `description` (1-300 characters) is shown to the model; `kind` is `text` (default) or `url`; `use` is `optional` (default), `first_email` or `every_email`; `example` (up to 300 characters) is used only where a real value is needed for a preview, such as an angle's sample email. Both forms can be mixed in one list. - How drafting uses them: every declared field is listed to the model with its description and kind. A `url` field is written in a body as the bare `{{report_url}}` alone on its own line, never in a subject (declared url fields are the only links allowed besides a template's own). A `first_email` field must be in email 1 and an `every_email` field in every email: Outlevo checks this in code, asks the model once more naming what is missing, and otherwise refuses with `DRAFT_MERGE_FIELD_MISSING` (502, nothing saved; draft again). The model writes only the tag; Outlevo fills each value per lead from the company's attributes, never the model. Outreach angles see the fields too and may rest on what they give the reader. - `language`: `en-US` (default, American English) or `en-GB` (British English, for the UK and Ireland). - The outbound policy is drafted with `POST /v1/policies { type: "outbound_policy", subject: "*", body: { templates, footer, caps, merge_fields, language } }`. That needs the `org:write` scope and a key with "Acts as me" made by an owner, admin or approver (the Integration preset includes `org:write`). A sales approver then approves it in the portal with a second factor; no key can approve. You can also draft it from the Outlevo chat, or in the portal. - Any other `{{tag}}` is refused when messages are set (400 with `details.unknown_tags`) and blocks the campaign's approval, because it would go out blank. - A lead whose company lacks a declared field that its messages use is not pushed: its revenue action is blocked with `MERGE_FIELD_MISSING`. Set the attribute with PATCH and the push runs again. Each pushed lead records the values it carried (`merge_values`). ## Reading back what happened - `GET /v1/campaigns/{id}/stats`: leads, pushed, sent, emails_sent, replied, bounced, hard_bounced, unsubscribed, and reply/bounce/unsubscribe rates (over leads sent at least one email). - `GET /v1/campaigns/{id}/leads?state=&external_id=&company_id=`: per lead, the contact, company (domain, external_id), state, emails_sent, first_sent_at, replied_at, bounced_at, unsubscribed_at and merge_values. - `POST /v1/campaigns/{id}/leads/{lead_id}/pause`: one lead stops getting this campaign's emails (Smartlead holds them; the lead keeps its state and `paused_at` is set). Works while a kill switch is on. `POST /v1/campaigns/{id}/leads/{lead_id}/resume` lets the sequence go on, and is refused when the person opted out (`SUPPRESSION_ACTIVE`), is no longer eligible, or a kill switch is on. Both answer `{ ok, lead_id, state, paused, already? }`; `already: true` means nothing changed. Live keys only. - Webhooks `lead.sent`, `lead.replied` (with `reply_text`), `lead.bounced` (with `hard`) and `lead.unsubscribed`, each with campaign_id, lead_id, contact_id, company_id, external_id and `at`. - Launching from code asks a person: `POST /v1/campaigns/{id}/launch-request` (scope campaigns:write) never starts anything. It checks sending (set up, warmed, DNS), the emails and the approvals; when ready it builds the campaign unstarted and answers `{ status: "waiting_for_approval", request_id, approval_url, expires_at }` (the same open request when asked again; a new one once it expired), otherwise `{ status: "not_ready", missing, sending }`. A signed-in owner or admin approves at the link (approving the first emails and starting the campaign). `GET /v1/campaigns/{id}/launch-request` reads the latest request (`pending`, `approved`, `declined`, `cancelled` or `expired`). `POST /v1/campaigns/{id}/companies { company_ids }` proposes the best contact at each company as a lead. `POST /v1/companies/find { brief?, like?, countries?, count?, signal?, signal_type? }` (scope companies:write) finds real companies on the web and adds nothing. - First emails: nothing of a campaign is sent until a signed-in person has reviewed its first 10 contacts' first emails (all of them when fewer) in app.outlevo.com, on autopilot too. `GET /v1/campaigns/{id}/first-batch` lists them as each contact gets them (`status` pending, approved or not_required; each email `waiting`, `approved` or `removed`). Before the campaign is built (no contact has joined it yet) the same endpoint returns a read-only preview of what the lined-up people would get, filled the way the build fills them and with their sources: `preview` is then an object (`approved`, `approved_at`, `can_send`), `lead_id` is the contact's id, and nothing is sent or charged by reading it (`preview` is null for the real batch). Leads pushed meanwhile wait, blocked `FIRST_BATCH_REVIEW`, and go once the batch is approved. `POST /v1/campaigns/{id}/first-batch/{lead_id}/remove` takes a contact out (that email is not sent). Approving and editing are a person's acts in the app: no key or MCP tool approves. - Outreach angles: before a campaign's emails, `GET /v1/campaigns/{id}/angles` lists 2-3 angles for its segment, the recommended one first (`kind` pain, trigger, proof or other; `hook`, `why`, the `facts` it rests on, a `sample` first email for a real researched account). `POST /v1/campaigns/{id}/angles` drafts them (AI; body `{ segment? }`), `POST /v1/campaigns/{id}/angle` `{ angle_id }` chooses one and drafts the emails around it. A built campaign's angle is switched only by a signed-in person while its first emails wait (they are rewritten and wait for review again). Unchosen, drafting uses the recommended one (`angle_chosen_by: "autopilot"`). - A/B test of the first email (off by default): `POST /v1/campaigns/{id}/ab-test` `{ kind: "angle", angle_id? }` (variant B: the first email around another angle) or `{ kind: "subject", subject }` (the same email under another subject line), before any of the campaign's emails are sent (on a built campaign, a signed-in person only); `POST /v1/campaigns/{id}/ab-test/stop`; `GET /v1/campaigns/{id}/ab-test` (scope `campaigns:read`) shows both variants with `reached`, `replies`, `interested`, `meetings` and bounces, the `verdict` and whether one can start (`offer`). Leads split about half each at push (`ab_variant` on the lead). The winner is decided on interested replies per contact reached once each variant reached 75 (probability 0.95 that it is better); after 300 each without one, `no_difference` and A stays. New leads get the winner; leads already sent go on with their sequence. `GET /v1/campaigns/{id}/stats` carries `ab_test`. - Website visitors (company level only; no person is identified): `GET /v1/visitors?days=30&in_icp=true` (scope `visitors:read`) lists companies that visited your website with pages, visits, `last_seen_at`, `pricing`, the `icp` match and whether each is in Accounts or a campaign; `POST /v1/visitors/accounts { domain }` (scope `visitors:write`) adds one to Accounts with its visits as `site_visit` signals. `GET`/`PUT /v1/visitors/settings` carries the script snippet with the public site key, the install check, `allowed_domains` and `eu_require_consent`. 1 credit per company identified per day. - Product summary: `GET /v1/context/understanding` is how Outlevo understands what you sell (what, for whom, problem, proof, unknowns), each line with the facts it rests on, and whether it is `due` to be shown. Corrections are context proposals (`POST /v1/context/proposals`). - Webhooks `lead.answered` (an interested reply was answered with the booking link; `by` is `autopilot` or `person`) and `meeting.booked` (a Calendly or Cal.com booking with one of your contacts; with `starts_at`). ## Webhooks - `POST /v1/webhooks { url, events }` returns the signing secret once. HTTPS only, public addresses only. - Header `Outlevo-Signature: t=,v1=.")>`. Accept if any `v1` matches (after a rotation there are two for 24 hours); reject if |now − t| > 300 s; dedupe on `Outlevo-Event-Id`. - `POST /v1/webhooks/{id}/test` sends a signed `webhook.test` delivery at once and answers with your endpoint's status code. `POST /v1/webhooks/{id}/rotate-secret` returns a new secret; the old one keeps signing for 24 hours. - `lead.classified` (a reply's class: `interested`, `question`, `not_now`, `wrong_person`, `unsubscribe`, `out_of_office`, `other`) carries `class`, `reason`, `by`, `campaign_name`, `first_name`, `last_name`, `title`, `company_name` and `domain` besides the lead ids; never the address (`GET /v1/contacts/{contact_id}`, scope `contacts:read`). - Failed deliveries retry after 1 min, 5 min, 30 min, 2 h and 12 h. `GET /v1/webhooks/{id}/deliveries` shows each attempt. - Events: job.completed, job.failed, company.created, company.qualified, company.disqualified, contact.discovered, contact.verified, evidence.added, revenue_action.proposed, revenue_action.approved, revenue_action.blocked, revenue_action.executed, revenue_action.failed, revenue_action.outcome_observed, handoff.created, handoff.accepted, handoff.rejected, campaign.status_changed, lead.sent, lead.replied, lead.bounced, lead.unsubscribed, lead.classified, lead.answered, meeting.booked, audience.ready, outcome.recorded, usage.threshold, competitor.added, competitor.confirmed, competitor.changed, competitor.account_linked. ## Exports, deduplication and automations (n8n, Zapier, Make, Clay, Google Sheets) - `GET /v1/companies/export.csv` or `.xlsx` (scope `companies:read`; filters `status`, `has_signal`, `signal_type`, `updated_since`, `relationship`): domain, name, status, fit, `icp_fit_score`, `intent_score`, the why-now signal with its source, country, employees. `GET /v1/contacts/export.csv|.xlsx` (scope `contacts:read`; `company_status`, `company_id`, `campaign_id`, `eligibility_status`, `verification_status`): name, title, email and its verification, LinkedIn, company, campaign states, `outreach_status` and `can_email` (opted-out people: their status and `no`). `GET /v1/campaigns/{id}/leads/export.csv|.xlsx` (scopes `campaigns:read` and `contacts:read`; `state`): sent, replied, `reply_class`, interested, meeting, variant, skipped reason. - Up to 5,000 rows at once (more answers 413 `FILE_TOO_LARGE`); `POST …/exports { format, filters }` builds up to 100,000 as a job (the read scope is enough), `GET …/exports/{id}` returns `download_url`, signed for 10 minutes; files are kept 7 days. Cells starting with `= + - @` are prefixed with `'`. Notion: import the CSV (Import → CSV). - One company per registrable domain (`www.`, subdomains, case and punycode folded; a merged company's domain and a website on another domain land on the known account: 409 `COMPANY_EXISTS` with `details.company_id`). One contact per mailbox: plus-addressing (and Gmail dots) only at Gmail, Outlook/Hotmail/Live, iCloud, Fastmail and Proton; a company domain keeps `+tags`. `GET /v1/companies/possible-duplicates` and `GET /v1/contacts/possible-duplicates` suggest fuzzy ones (the same name on another domain; the same name at one company with two addresses) and never merge them; `POST …/possible-duplicates/dismiss { a_id, b_id }` keeps a pair apart; `POST /v1/companies/{id}/merge { merge_ids, confirm_different_domains: true }` merges across domains. Imports report `quality.dedupe.summary` ("12 new, 5 already in Accounts, 2 possible duplicates"). - n8n workflows to import (unverified against a live n8n): https://developers.outlevo.com/templates/n8n/interested-reply-to-slack-hubspot.json and https://developers.outlevo.com/templates/n8n/google-sheet-row-to-outlevo-company.json. Zapier, Make, Clay and Google Sheets (Apps Script) recipes: https://developers.outlevo.com/automations.html ## TypeScript SDK (server): `npm install https://developers.outlevo.com/outlevo-sdk-0.4.0.tgz` ```ts import { Outlevo, OutlevoError, verifyWebhook } from '@outlevo/sdk'; const ol = new Outlevo({ apiKey: process.env.OUTLEVO_KEY! }); // idempotency keys and retries are built in const company = await ol.companies.upsert({ domain: 'acme.com', external_id: 'site-17', attributes: { pages_exposed: 412 } }); const quote = await ol.companies.qualify(company.id as string); // { credit_estimate, confirm_required } const started = await ol.companies.qualify(company.id as string, { confirm: true }) as { job_id: string }; const job = await ol.jobs.wait(started.job_id); for await (const c of ol.paginate((cursor) => ol.companies.list({ limit: 200, cursor }))) console.log(c.domain); const stats = await ol.campaigns.stats(campaignId); const sub = await ol.webhookSubscriptions.create({ url: 'https://your.app/api/outlevo-webhook', events: ['lead.replied', 'company.qualified'] }); // in your webhook route, with the RAW body (accepts both signatures during a secret rotation): const event = await verifyWebhook(rawBody, req.headers['outlevo-signature'], process.env.OUTLEVO_WEBHOOK_SECRET!); ``` ## Components (React, Web Component): `npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz` Render through your own server route that holds the key and forwards only the paths you allow: ```tsx import { OutlevoProvider, ReadinessCard } from '@outlevo/components'; fetch(`/api/outlevo${path}`, init)}> console.log(d)} /> ``` Web Component: `import '@outlevo/components/element'`, then ``. Theme with CSS variables: --ol-font, --ol-radius, --ol-surface, --ol-text, --ol-muted, --ol-accent, --ol-danger. ## TypeScript / Node without the SDK ```ts const OL = 'https://api.outlevo.com'; const headers = (write = false) => ({ authorization: `Bearer ${process.env.OUTLEVO_KEY}`, 'content-type': 'application/json', ...(write ? { 'idempotency-key': crypto.randomUUID() } : {}) }); const { data } = await (await fetch(`${OL}/v1/companies?limit=50`, { headers: headers() })).json(); const started = await (await fetch(`${OL}/v1/companies/${data[0].id}/qualify?confirm=true`, { method: 'POST', headers: headers(true) })).json(); // { job_id } // webhook route, with the RAW body: import { createHmac, timingSafeEqual } from 'node:crypto'; function verify(raw: string, header: string, secret: string) { const parts = header.split(',').map((p) => p.split('=')); const t = Number(parts.find(([k]) => k === 't')?.[1]); if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false; const want = Buffer.from(createHmac('sha256', secret).update(`${t}.${raw}`).digest('hex')); return parts.some(([k, v]) => k === 'v1' && v && v.length === want.length && timingSafeEqual(Buffer.from(v), want)); } ``` ## PHP / Laravel (server) ```php // config/services.php: 'outlevo' => ['key' => env('OUTLEVO_KEY'), 'webhook_secret' => env('OUTLEVO_WEBHOOK_SECRET')] use Illuminate\Support\Facades\Http; use Illuminate\Support\Str; use Illuminate\Http\Client\{ConnectionException, RequestException}; $ol = fn () => Http::baseUrl('https://api.outlevo.com')->withToken(config('services.outlevo.key'))->acceptJson()->timeout(15) ->retry(3, 500, fn ($e) => $e instanceof ConnectionException || ($e instanceof RequestException && in_array($e->response->status(), [429, 502, 503], true)), throw: false); // one Idempotency-Key per operation, reused on retries (the closure above retries with the same headers) $res = $ol()->withHeaders(['Idempotency-Key' => (string) Str::uuid()]) ->post('/v1/companies', ['domain' => 'acme.com', 'external_id' => (string) $site->id, 'attributes' => ['pages_exposed' => 412]]); if ($res->status() === 409) { $companyId = $res->json('error.details.company_id'); } ``` Webhook controller (exclude the route from CSRF; use the raw body): ```php public function __invoke(Request $request) { $raw = $request->getContent(); $parts = collect(explode(',', (string) $request->header('Outlevo-Signature')))->map(fn ($p) => explode('=', trim($p), 2)); $t = (int) optional($parts->first(fn ($p) => $p[0] === 't'))[1]; abort_if(! $t || abs(time() - $t) > 300, 400); $want = hash_hmac('sha256', $t.'.'.$raw, config('services.outlevo.webhook_secret')); abort_unless($parts->contains(fn ($p) => $p[0] === 'v1' && hash_equals($want, $p[1] ?? '')), 400); $event = json_decode($raw, true); if (Cache::add('outlevo-event:'.$event['id'], 1, now()->addDay())) { HandleOutlevoEvent::dispatch($event); // queue job: answer 2xx fast } return response()->noContent(); } ``` Slow calls (research, bulk) go in a queue job, not a request; in admin panels (e.g. Filament) load them after the page renders (Livewire `wire:init`). For local webhook testing use a tunnel (`cloudflared tunnel --url http://localhost:8000` or `ngrok http 8000`) and `POST /v1/webhooks/{id}/test`. Full guide: https://developers.outlevo.com/quickstarts/laravel.md. ## Ads The workspace's own advertising: the ad accounts the workspace connected in Outlevo, or gave Outlevo to run. Use it to run your own workspace's ads from your app (case 1 above), or a user's workspace in case 2. Outlevo holds those connections and the platform access (its Google Cloud project's Google Ads API access, its Meta, Reddit, X and LinkedIn app approvals). It is not a way to reach your customers' ad accounts: for that, integrate Google Ads, Meta and the rest directly. Guide: https://developers.outlevo.com/ads.html - Key: the workspace's owner makes it at app.outlevo.com → Developers with the Ads preset and "Acts as me"; in case 1 it is your one platform key. `ads:read` reads; `ads:write` picks and disconnects accounts (acts as a person), keeps Google Ads IP exclusions, sends click conversions and retracts Google conversions; `ads:manage` runs the ad campaigns (approve, launch, pause, caps, kill switch, managed ads): it spends money, so only an owner grants it and only on a key that acts as them. - Two ways an account is connected, both by a person signed in at app.outlevo.com (no API or key can start it): the workspace connects its own (Audiences for Google Ads and LinkedIn audiences, Ad campaigns for Reddit, Meta, X and LinkedIn Ads), or gives Outlevo access and Outlevo runs it (Google: a client link to Outlevo's manager account; others: managed ads). Then your app reads it: `GET /v1/ads/connections/{id}/accounts` and `PUT /v1/ads/connections/{id} { ad_account_id }`. - `GET /v1/ads/connections`: every connection with `provider` (google, linkedin, reddit_ads, meta_ads, x_ads, linkedin_ads), `run_by` (workspace or outlevo) and `capabilities`. `GET /v1/ads/providers`: which can be connected now. - Google Ads: `GET …/campaigns?days=30`, `GET …/conversion-actions?type=UPLOAD_CLICKS`, `PUT …/ip-exclusions { owner, ips }` (only that owner's entries are added or removed; at most 500 per campaign, the advertiser's own first), `DELETE …/ip-exclusions?owner=`, `POST …/conversion-adjustments { conversion_action_id, order_id }` (retraction; `not_found` when Google has none yet). - `POST /v1/ads/connections/{id}/conversions { event_id, occurred_at, click_id, click_id_type, conversion_action_id? }`: Google (gclid/gbraid/wbraid, Data Manager API, 90 days) or Meta (fbclid, the connection's pixel, 7 days); event_id dedupes. - The ad campaigns Outlevo runs: `/v1/ad-campaigns` (overview), `/v1/ad-campaigns/test-sets/{id}`, `…/launch`, `…/pause`, `/v1/ad-campaigns/ads/{id}/approve|reject`, `/v1/ad-campaigns/caps/{platform}`, `/v1/ad-campaigns/kill-switch`. - `PROVIDER_ACCESS_REQUIRED`: Outlevo's platform access is not granted yet (Google: its Cloud project still on Test access), nothing for the workspace to do. `CONNECTION_DISCONNECTED`: connect again. ## MCP Remote server (Streamable HTTP): `https://api.outlevo.com/mcp`, header `Authorization: Bearer `. Or no key: clients that do MCP OAuth (Claude, ChatGPT, Claude Code, Cursor, VS Code) register themselves and sign in; an owner or admin allows them in the app and sets day and month credit caps. Claude Code: `claude mcp add --transport http outlevo https://api.outlevo.com/mcp`, then `/mcp` → Authenticate. Cursor: `{ "mcpServers": { "outlevo": { "url": "https://api.outlevo.com/mcp" } } }` in `.cursor/mcp.json`, then sign in from Cursor Settings → MCP. Setup per tool: https://outlevo.com/integrations/claude-code/ and https://outlevo.com/integrations/cursor/. Tools: ask_outlevo (talk to the assistant: the chat-first way), get_context, get_icp, list_companies, get_company, list_revenue_actions, get_job, estimate_credits, qualify_company, research_company, discover_contacts, verify_contact, propose_revenue_action, list_campaigns, create_campaign, find_companies, add_companies, list_campaign_angles, choose_angle, draft_campaign_emails, get_outbound_policy (the approved outbound policy's merge fields and language: read only), draft_outbound_policy (a new outbound policy version for a person to approve in the app; never in force by itself), get_campaign, list_first_batch (a campaign's first emails waiting for review: read only, a person approves them in the app), request_launch, list_campaign_signals (a campaign's accounts with a fresh buying signal), get_campaign_ab_test (the A/B test of a campaign's first email, per variant, and the next test Outlevo proposes), start_next_ab_test (refused for every API key with USER_KEY_REQUIRED: a signed-in person starts it in the app), dismiss_next_ab_test ("not now"; campaigns:write), list_site_visitors (companies that visited your website), enrich_list (a CSV or domains in, the same list back with fit and its reason, the decision maker with a checked email and a why-now signal, each quoted: one quote, then confirm: true), get_enrichment (progress, or the enriched CSV), export_list (Accounts, Contacts or a campaign's leads as CSV or Excel: a download link), list_linkedin_tasks (LinkedIn notes and messages drafted for a person to send by hand, or sent from their own account when they turned auto-sending on; the tool never sends), get_product_understanding (read only), custom questions about companies (list_questions, add_question, update_question, answer_questions: 1 credit per company per question, each answer quoted from a page or not found; list_custom_signals, add_custom_signal: a signal from your own system, Growth), and for the workspace's own ads (see Ads): list_ad_connections, choose_ad_account, list_google_ads_campaigns, list_conversion_actions, sync_ip_exclusions, report_ad_conversion, retract_ad_conversion, get_ad_campaigns and run_ad_campaigns (needs ads:manage); for ICP audiences: get_icp_audiences, build_icp_audience (pushes run once a person approves), set_icp_audience_settings, improve_matches, stop_icp_audience and export_icp_audience; for the first campaign from a website (F35): get_first_campaign_steps, check_and_find_people (checks a company against the ICP and, if it qualifies, finds its decision makers: one quote), get_people_with_channels and add_people_with_channels (each person with email, LinkedIn or both; nothing is sent); and to stop or cap spending: pause_campaign, stop_campaign, stop_everything (the workspace stop switch; turning it back on is done by a person in the app), get_budget and set_budget (a key can only lower the daily or monthly credit budget; usage:write). Metered tools return `{ status: "confirmation_required", credit_estimate }` unless called with `confirm: true`. A whole campaign from the editor: create_campaign (with a `segment`: its angles are drafted) → find_companies (`like`, a `brief`, or a `signal`; nothing is added) → add_companies with `campaign_id` (free; the best contact at each becomes a lead, or it says to qualify_company and discover_contacts first) → list_campaign_angles, choose_angle → draft_campaign_emails → request_launch. request_launch sends nothing: it builds the campaign unstarted and returns `{ status: "waiting_for_approval", approval_url, expires_at }` (24 hours); the owners and admins are told by email and in the campaign's chat, and a signed-in owner or admin opens the link, reviews the first emails and approves, which starts the campaign on autopilot. With no mailboxes ready it returns `{ status: "not_ready", missing: [{ what, detail, next }] }` (managed sending not set up, or warming up until a date) and requests nothing. get_campaign says "Waiting for your approval at " until then, and afterwards reports sends, replies, meetings and cost per meeting. The key needs campaigns:write and companies:write and "Acts as me". A test key rehearses create_campaign and add_companies in the sandbox; find_companies, angles, drafting and request_launch need a live key (they call AI and Smartlead). ```json { "mcpServers": { "outlevo": { "type": "http", "url": "https://api.outlevo.com/mcp", "headers": { "Authorization": "Bearer ${OUTLEVO_KEY}" } } } } ``` ## Reference - OpenAPI 3.1: https://api.outlevo.com/v1/openapi.json - API reference: https://developers.outlevo.com/api.html - Status: https://developers.outlevo.com/status.html --- # AGENTS.md: integrating Outlevo Instructions for coding agents adding Outlevo to an app. The API reference is https://api.outlevo.com/v1/openapi.json; the working examples are in https://developers.outlevo.com/llms.txt (short) and https://developers.outlevo.com/llms-full.txt (everything). ## First: decide which integration this is Outlevo is used in two ways, and they differ in where the key lives and who ever sees Outlevo. Decide which one this is before writing anything. 1. **Outlevo works for your own company (the usual case).** Your product finds, researches and emails its *own* prospects through one Outlevo workspace: yours. One live key for the whole installation, in a server env var or your platform's admin settings; never a key per user, per customer or per account. Your users and customers never see Outlevo: no "Connect Outlevo", no Outlevo key field, no Outlevo name in your customer-facing screens, help, emails or privacy page. The usual shape: your app pushes the companies it found (`external_id` = your id, `attributes` = what you know about them), Outlevo qualifies them, finds the person, writes and sends, and webhooks bring replies and meetings back to your admin screens. 2. **Your users bring their own Outlevo workspace.** Each of your customers has an Outlevo account and pastes their own key into your app, which then works on their workspace. Build this only when the product's owner asks for exactly that. When the request is ambiguous, it is case 1: "use Outlevo to find our customers", "add Outlevo outbound to our admin" are case 1. Every key acts on one workspace, and in case 1 that workspace is yours; a feature documented "with the workspace's key" (ads, audiences) does not make it case 2. Outlevo gives your product no access to your customers' ad accounts, CRMs or mailboxes. If your product itself needs your customers' Google Ads, Meta or another platform (to exclude bot IPs from their campaigns, to send their conversions), integrate that platform directly with your own OAuth app. Outlevo's platform access covers Outlevo workspaces only. In case 1, when the product's owner wants to work from their own admin panel (chat, what needs a person, campaigns, replies), follow https://developers.outlevo.com/quickstarts/admin-console.md. It says which screens to build and what stays in app.outlevo.com. ## Always - Call Outlevo from the server only. Keys live in server env vars (`OUTLEVO_KEY`, `OUTLEVO_WEBHOOK_SECRET`), never in frontend bundles, `VITE_`/`NEXT_PUBLIC_` variables, or git. A live key used from a browser is refused. - Send `Idempotency-Key` (a fresh UUID per operation, reused on retry) on every POST, PUT and PATCH. - Retry only 429 (honour `Retry-After`), 502, 503 and connection errors, with backoff. Do not retry other 4xx: read `error.fix`. - Quote before spending: metered calls answer `{ credit_estimate }` without `?confirm=true`. Show the estimate to a person or keep it within a budget you were given before confirming. - Treat 202 `{ job_id }` as "started": poll `GET /v1/jobs/{id}` from a background job, or wait for the webhook. Never block a web request on it. - Verify every webhook: HMAC-SHA256 over `"."`, accept if any `v1` matches, reject when |now − t| > 300 s, dedupe on `Outlevo-Event-Id`, answer 2xx fast and do the work in a queue. - Page through lists with `next_cursor`; never assume one call returns everything. - Store your own id on each company as `external_id`, and your data as `attributes`. On 409 `COMPANY_EXISTS`, use `error.details.company_id` instead of creating again. - For features your users drive (adding accounts, launching, reading replies), prefer the chat-first endpoint `POST /v1/assistant/messages`: one call in plain language, and the assistant does the work with the key's scopes. Render its `cards`; run a `confirm` card's `calls` only after the user presses Confirm; open `form` and `launch` cards in app.outlevo.com; show `choices` as buttons plus a free-text box. With React, `` does all of this. - In TypeScript/JavaScript, use `@outlevo/sdk` (`npm install https://developers.outlevo.com/outlevo-sdk-0.4.0.tgz`; it adds idempotency keys, retries, paging and webhook verification); in other languages call the REST API. - Develop against a test key (sandbox: fake data, no credits). Switch to a live key only on the server, with the scopes the code uses. ## Never - Never run a `confirm` card's calls without the user's click, and never ask the user for a Smartlead key or a CSV in a chat: those `form` cards open in app.outlevo.com. - Never try to approve, start or send through the API, and never ask for a key that could: those steps are done by people in the portal, and no key can do them. To launch, call `POST /v1/campaigns/{id}/launch-request` (MCP `request_launch`) and give the person its `approval_url`: a signed-in owner or admin approves there. Never say a campaign is sending until `get_campaign` (or `GET /v1/campaigns/{id}`) says it is active. - Never invent merge tags. Messages may use `{{first_name}}`, `{{last_name}}`, `{{email}}`, `{{company_name}}`, `{{website}}`, `{{job_title}}` and the company attributes listed in the approved outbound policy's `merge_fields`. Never write a merge field's value yourself: write the `{{tag}}` and Outlevo fills it per lead. - To make Outlevo's emails use your data properly, declare each field as an object with a `description`, `kind` (`text` or `url`) and `use` (`optional`, `first_email`, `every_email`) rather than a bare key; `language: "en-GB"` for UK and Irish audiences. If drafting answers `DRAFT_MERGE_FIELD_MISSING`, draft again or make the field's description plainer; do not paste the value into the emails. MCP: `get_outbound_policy` reads them, `draft_outbound_policy` proposes a version a person approves. - Never send mail to Outlevo leads from the app's own pipeline at the same time as an Outlevo campaign. - Never log the key, the webhook secret, contacts' email addresses or reply text in plain logs. ## Ads - `/v1/ads/*`, `/v1/ad-campaigns/*` and the ad tools act on the key's own workspace: its ad accounts and the ad campaigns Outlevo runs for it. Never use them to reach your customers' ad accounts, and never ask your customers for an Outlevo key to do so: integrate Google Ads, Meta and the rest directly with your own OAuth app. - For the workspace's own ads, the key has the Ads preset and "Acts as me", made by its owner. Outlevo holds the platform access for these accounts, so no OAuth client or developer token of yours is involved. Guide: https://developers.outlevo.com/ads.html - Connecting an ad account is done by a person signed in at app.outlevo.com (Audiences, Ad campaigns); no API or key can start it, so link there. Then read the connection and pick the account. Work with connections by id from `GET /v1/ads/connections`, and only do what its `capabilities` list. - IP exclusions: always pass your own `owner`; never remove entries you did not add. - `ads:manage` spends the workspace's ad budget (approving ads, launching, caps). Use it only for what the person asked in your app. ## Approval gates (people, in the portal) Nothing goes out until all of these hold: 1. An ICP version is approved. 2. An admin connected Smartlead. 3. Mailboxes are warmed up with daily caps, and SPF, DKIM and DMARC pass. 4. A sales approver approved an `outbound_policy` with templates, a footer (postal address and opt-out line), caps, the `merge_fields` the messages use (keys, or objects with description, kind and use) and optionally `language`. Code may draft it (`POST /v1/policies`, scope `org:write`, a key with "Acts as me" from an owner, admin or approver); only a person approves it. 5. The campaign's messages passed Outlevo's automatic check, or Outlevo's AI reviewer cleared or corrected the ones it flagged (within minutes; what it can't clear safely comes back to the person with what to change). 6. For an organization's first campaign, a person approved the exact messages. 7. An owner, admin or sales approver started the campaign (or an owner or admin approved its launch request at the link `request_launch` returned). 8. Outlevo enabled outbound sending (and contact discovery, if used) for the country after legal review. If the code needs one of these, stop and tell the person what to do in the portal (app.outlevo.com). ## Roles a key acts with - A key without "Acts as me" acts as a developer: reads, companies, contacts, signals, evidence, revenue-action proposals and webhooks. - Campaign writes and handoff decisions need a key with "Acts as me" made by a member with the right role (rep or above for campaigns). Only owners and admins create keys; live keys need a recent second factor, scopes and spend caps. --- # Outlevo quickstart for Laravel For a Laravel app that pushes its own companies into Outlevo, lets Outlevo run approved outbound, and shows what happened in its own screens (Blade, Livewire or Filament). Everything runs on your server: the browser never sees an Outlevo key. This is Outlevo working for your own company: one key for the whole installation (`.env` or your admin panel's platform settings), not one per user or per customer account, and nothing about Outlevo in what your customers see. Only if the product's owner asked for each of your customers to bring their own Outlevo workspace is it the other integration: see "Before you write code" in https://developers.outlevo.com/llms.txt. ## 1. Keys 1. Sign in at https://app.outlevo.com and open **Developers**. Only an owner or admin sees **New test key** and **New live key**. 2. Start with a **test** key: it works on your sandbox (100 fake companies, no vendors, no credits). 3. For outbound (campaigns, leads), tick **Acts as me**. A key without it acts as a developer and gets `403 FORBIDDEN` on campaign writes. The member who creates it needs the rep, sales_approver, marketing_approver, admin or owner role. 4. A live key needs a second factor in the last 12 hours, the scopes it uses (e.g. `companies:read companies:write signals:write campaigns:read campaigns:write jobs:read webhooks:manage`) and three spend caps. ```dotenv OUTLEVO_KEY=olv_test_... OUTLEVO_WEBHOOK_SECRET=whsec_... # returned once by POST /v1/webhooks ``` ```php // config/services.php 'outlevo' => ['key' => env('OUTLEVO_KEY'), 'webhook_secret' => env('OUTLEVO_WEBHOOK_SECRET')], ``` ## 2. A client with idempotency and retries ```php namespace App\Services; use Illuminate\Http\Client\{ConnectionException, PendingRequest, RequestException, Response}; use Illuminate\Support\Facades\Http; use Illuminate\Support\Str; class Outlevo { private function http(): PendingRequest { return Http::baseUrl('https://api.outlevo.com') ->withToken(config('services.outlevo.key')) ->acceptJson()->timeout(15) // retries resend the same headers, so the Idempotency-Key below is reused, as Outlevo expects ->retry(3, 500, fn ($e) => $e instanceof ConnectionException || ($e instanceof RequestException && in_array($e->response->status(), [429, 502, 503], true)), throw: false); } public function get(string $path, array $query = []): Response { return $this->http()->get($path, $query); } /** POST/PUT/PATCH: one Idempotency-Key per operation. Pass your own key to make a queued job's retries safe too. */ public function write(string $method, string $path, array $body = [], ?string $key = null): Response { return $this->http()->withHeaders(['Idempotency-Key' => $key ?? (string) Str::uuid()])->send($method, $path, ['json' => $body]); } } ``` Errors are JSON: `{"error": {"code", "message", "fix", "details", "request_id"}}`. Log `request_id`; show `fix` to whoever can act on it. ## 3. Push companies with your data ```php $res = app(Outlevo::class)->write('POST', '/v1/companies', [ 'domain' => $site->domain, 'external_id' => (string) $site->id, // your id; find it again with ?external_id= 'attributes' => [ // flat: string, number or boolean values 'pages_exposed' => $audit->pages_exposed, 'ai_bots_allowed' => $audit->ai_bots_allowed, 'report_url' => route('reports.show', $audit), ], ], key: "site-{$site->id}-create"); $companyId = $res->status() === 409 ? $res->json('error.details.company_id') // COMPANY_EXISTS: it is already there : $res->json('id'); // later changes: attributes merge; null removes a key app(Outlevo::class)->write('PATCH', "/v1/companies/{$companyId}", ['attributes' => ['pages_exposed' => 650]]); ``` Many at once: `POST /v1/companies/bulk` with up to 1,000 `records` (same fields). It answers 202 with a `job_id`; poll `GET /v1/jobs/{id}` from a queue job. Tell Outlevo something happened, with the link and the numbers: ```php app(Outlevo::class)->write('POST', '/v1/signals', [ 'company_id' => $companyId, 'source' => 'botscope', 'type' => 'audit_completed', 'weight' => 40, 'observed_at' => now()->toIso8601String(), 'url' => route('reports.show', $audit), 'data' => ['pages_exposed' => $audit->pages_exposed], ]); ``` ## 4. Use your numbers in emails Put the attributes your messages use in the outbound policy's `merge_fields`, e.g. `["pages_exposed", "report_url"]`: draft the policy with `POST /v1/policies` (type `outbound_policy`, with templates, footer and caps in its body), and a sales approver approves it in the portal. Then messages can say `{{pages_exposed}}`. Outlevo refuses any undeclared tag, and holds back a lead whose company has no value for a tag its messages use (`MERGE_FIELD_MISSING`) until you PATCH the attribute. ## 5. Receive webhooks ```php // routes/web.php (or api.php) Route::post('/webhooks/outlevo', OutlevoWebhookController::class)->withoutMiddleware([\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class]); ``` ```php namespace App\Http\Controllers; use App\Jobs\HandleOutlevoEvent; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; class OutlevoWebhookController { public function __invoke(Request $request) { $raw = $request->getContent(); // the raw body: do not re-encode the JSON $parts = collect(explode(',', (string) $request->header('Outlevo-Signature'))) ->map(fn ($p) => explode('=', trim($p), 2)); $t = (int) optional($parts->first(fn ($p) => $p[0] === 't'))[1]; abort_if(! $t || abs(time() - $t) > 300, 400, 'stale'); $want = hash_hmac('sha256', $t.'.'.$raw, config('services.outlevo.webhook_secret')); // after a secret rotation the header has two v1 values for 24 hours; either may match abort_unless($parts->contains(fn ($p) => $p[0] === 'v1' && hash_equals($want, $p[1] ?? '')), 400, 'bad signature'); $event = json_decode($raw, true); if (Cache::add('outlevo-event:'.$event['id'], 1, now()->addDay())) { // deliveries can repeat HandleOutlevoEvent::dispatch($event); // answer 2xx fast; work in the queue } return response()->noContent(); } } ``` Subscribe once (a command or tinker), keep the secret it returns, and send a test: ```php $sub = app(Outlevo::class)->write('POST', '/v1/webhooks', ['url' => 'https://your.app/webhooks/outlevo', 'events' => ['company.created', 'company.qualified', 'lead.sent', 'lead.replied', 'lead.bounced', 'lead.unsubscribed', 'campaign.status_changed', 'job.completed']]); // $sub['secret'] is shown once → OUTLEVO_WEBHOOK_SECRET app(Outlevo::class)->write('POST', "/v1/webhooks/{$sub['id']}/test"); // { delivered, status_code } ``` Rotate later with `POST /v1/webhooks/{id}/rotate-secret`: the old secret keeps signing for 24 hours while you deploy the new one. Locally, expose your app with a tunnel and subscribe that URL: ```bash php artisan serve cloudflared tunnel --url http://localhost:8000 # or: ngrok http 8000 ``` ## 6. Show what happened, in your own screens ```php $stats = app(Outlevo::class)->get("/v1/campaigns/{$campaignId}/stats")->json(); // leads, pushed, sent, emails_sent, replied, bounced, hard_bounced, unsubscribed, reply_rate, bounce_rate, unsubscribe_rate $leads = app(Outlevo::class)->get("/v1/campaigns/{$campaignId}/leads", ['external_id' => (string) $site->id])->json('data'); // per lead: state, emails_sent, first_sent_at, replied_at, bounced_at, unsubscribed_at, merge_values ``` Lists are paged: pass `limit` and the previous answer's `next_cursor` as `cursor`. In Filament or Livewire, load these after the page renders (`wire:init`) and cache them briefly: they are network calls. Prefer the `lead.*` webhooks for anything that must be up to date. ## 7. What a person does before anything sends No API key can do these, by design. Plan for them before you switch your own sending off: 1. An ICP version is approved in the portal. 2. An admin connects Smartlead (portal → Integrations). 3. Mailboxes are warmed up with daily caps; SPF, DKIM and DMARC pass on the sending domains. 4. A sales approver approves an outbound policy with templates, a footer (postal address and opt-out line), caps and `merge_fields`. 5. The campaign's messages pass Outlevo's automatic check, or Outlevo's AI reviewer clears or corrects the ones it flagged (within minutes; what it can't clear safely comes back to the person with what to change). 6. For the organization's first campaign, a person approves the exact messages. 7. An owner, admin or sales approver starts the campaign in the portal. 8. Outlevo has enabled outbound sending (and contact discovery, if used) for your country after legal review. Until a campaign has sent, keep your existing pipeline and turn it off only after Outlevo's first approved campaign is live. --- # Outlevo console inside your admin panel For a product that uses Outlevo to find its own customers and wants the people who run it to work from the product's own admin panel: the same chat as app.outlevo.com, what needs a person, campaigns, replies, meetings. This is "Outlevo works for your own company" (case 1 in https://developers.outlevo.com/llms.txt): one key on your server, and only your platform's admins ever see these screens. Your customers never do. Build it in the order below. Each screen says what it reads, how it behaves and what it must not do. ## What stays in Outlevo People open app.outlevo.com for these and nothing else. No API or key can do them, so never build a button that pretends to. Show that the step is waiting and link straight to it. | Step | Where | |---|---| | Connect an ad account | `/audiences` (Google Ads, LinkedIn audiences), `/ad-campaigns` (Reddit, Meta, X, LinkedIn Ads) | | Approve a launch | the request's `approval_url` (`/launch/{id}`) | | Review a campaign's first emails | `/campaigns/{id}` | | Approve an ICP, an outbound policy, the first campaign's messages | `/approvals/{policy_id}` | | Connect Smartlead, import a CSV | `/integrations`, `/import` | | Create API keys | `/developers` | Everything else, including starting the work that leads to those steps, happens in your panel. ## 1. The key and who may reach it - One key for the whole installation, stored on your server (env var or platform settings). Start with a test key (`olv_test_…`): it works on the sandbox, nothing is sent, no credits are spent. Show plainly on the screen that it is a test key. - Create it at app.outlevo.com → Developers with **Acts as me**, from the **Integration** preset (companies, signals, campaigns, policy drafts, webhooks, `assistant:read`, `assistant:write`), plus `ads:read` and `usage:read` for screens 5 and 6. Add a scope only when a screen needs it. Confirm cards run the calls the assistant proposed, so the key needs their scopes too: a call it lacks answers 403, which your screen shows as it is. - Every console route checks that the signed-in person is a platform admin, on the server, before anything else. Hiding the menu item is not access control. ## 2. Three server routes, never a catch-all proxy The browser never sees the key, and it never chooses what is called with it. A route that forwards any path the browser names hands the key's full power to anyone who gets a script into your admin. Give the browser these routes and nothing else: | Your route | What your server does | |---|---| | `GET …/thread` | `GET /v1/assistant/thread` and returns `messages` and `chat.answering` | | `POST …/messages { message }` | `POST /v1/assistant/messages { message, page }` | | `POST …/cards { message_id, index, keep? }` | Reads the thread **itself**, finds that message's card, runs the card's `calls`, marks it done | The cards route takes numbers, not calls. A card's `calls` come from Outlevo's copy of the thread, and your server refuses anything whose path does not start with `/v1/`, whose method is not `POST` or `PUT`, or whose card is already `done`. For a `companies` card, `keep` is the row indexes the person left ticked; your server takes those `records` from the thread and posts them to `/v1/companies/bulk`. Any undo route takes an event id only (`POST /v1/assistant/events/{id}/undo`). Send every write with an `Idempotency-Key`. `@outlevo/components` (``, ``) are fine in a customer-free React app, but they call whatever path the card names through your endpoint, so they need the catch-all this section rules out. In an admin panel holding a live key, render the chat yourself as below. ## 3. Screen: Needs you The first thing on the page, because it is the reason to open the page. Read after the page has rendered, cache for about a minute, and list only what is waiting on a person, each with a link into Outlevo: - `GET /v1/campaigns`, then for each campaign that is not finished, `GET /v1/campaigns/{id}/launch-request`: `launch_request.status` `pending` means a launch waits at `approval_url` until `expires_at`. - `GET /v1/campaigns/{id}/first-batch`: `status` `pending` with `ready_at` set means the first emails wait at `/campaigns/{id}`. - `GET /v1/campaigns/{id}`: `problems.approval` and `problems.senders` say in words what blocks it. - `GET /v1/policies?status=pending`: each waits at `/approvals/{id}`. An empty list says so ("Nothing is waiting for you"). A failed read says that it failed, and never reads as "nothing is waiting". ## 4. Screen: Chat The same assistant and the same thread as app.outlevo.com: a conversation started in one continues in the other. **Sending.** Add the person's message to the list and show a sentence saying the assistant is working on the click, before the network. Disable the box and the buttons until the answer. Send one request per message. **Slow answers.** A turn that searches the web can take minutes, longer than your web server waits. Give your request a timeout under your proxy's limit (say 50 s) and answer "still working" when it passes. Outlevo keeps going: read the thread every few seconds until `chat.answering` is false, and give up with a message after about three minutes so the screen cannot freeze. **Rendering.** `messages[]` has `id`, `role` (`user`, `assistant`, `staff`, `event`), `body`, `author`, `mine`, and on assistant messages `widgets`, `choices` and `links`. Render text as text, never as HTML: replies quote other people's websites. - `role: event` is a quiet one-line note of what changed; with `undoable: true` it gets an Undo button that sends its `id`. - `choices.options`, on the last message only: buttons that send that text, with the free-text box still there. - `links`: `path` and `label`, relative to https://app.outlevo.com. **Cards** (`widgets[]`). A card with `done` shows `done.text` and no button. | `type` | Show | |---|---| | `table` | `title`, `columns`, `rows` | | `confirm` | `title`, `detail`, `credits` on the button; on Confirm call your cards route. Never run it without the click | | `companies` | `rows` with a tick each, all ticked; the button adds the ticked ones through your cards route | | `chart` | `series` of `day`, `sent`, `replied`; a small table is enough | | `link` | `title`, `detail`, a link to `path` labelled `label` | | `launch`, `first_batch`, `angles`, `people` | `title` and a link to `/campaigns/{campaign_id}` | | `form` | `title` and a link: `csv_import` to `/import`, `api_key` and `webhook` to `/developers`, the rest to `/integrations` | | anything else | `title` and a link to https://app.outlevo.com. New types appear, so an unknown one must not break the list | **Limits.** 429 `RATE_LIMITED` shows its `fix` as a sentence. The assistant never approves, starts or sends; if a person asks it to, it answers with a card that leads to Outlevo. ## 5. Screen: Campaigns `GET /v1/campaigns` with `GET /v1/campaigns/{id}/stats` for each one that is not a `draft`: sent, replied, interested replies, meetings, reply and bounce rates, cost per meeting. Load after the page renders, one call per campaign, cached about 5 minutes. Each row links to `/campaigns/{id}`. Do not offer Start or Approve. ## 6. Screen: Replies and meetings Do not poll for these. Subscribe once (`POST /v1/webhooks`, https://developers.outlevo.com/webhooks.html) to `lead.replied`, `lead.classified`, `lead.answered`, `meeting.booked`, `lead.bounced`, `lead.unsubscribed` and `company.qualified`, verify `Outlevo-Signature`, dedupe on `Outlevo-Event-Id`, and store them against your own record through `external_id`. The screen reads your database, so it opens instantly and works while Outlevo is down. Show a reply in full: it is what the person came to read. ## 7. Screen: Ad accounts and credits - `GET /v1/ads/connections` (scope `ads:read`): each connection's `provider`, `ad_account_name`, `status` (`awaiting_account`, `active`, `token_error`), `run_by`. Beside it, one link to Connect in Outlevo: `/audiences` for Google Ads and LinkedIn audiences, `/ad-campaigns` for the others. A connection in `awaiting_account` or `token_error` links there too. There is no API for connecting, on purpose: granting access to an ad account is done by a person signed in to Outlevo. - `GET /v1/usage` (scope `usage:read`): `available` credits, `plan`, `cycle.end`. Add `GET /v1/usage/forecast` for the warning that they are running out. ## When it is done - [ ] A person who is not a platform admin gets 403 from every console route, and the page does not appear in their menu. - [ ] The browser's network log holds no key, and no route accepts a path or a `calls` list from it. - [ ] The page renders before any call to Outlevo, and each panel has its own loading, empty and failed state. - [ ] Without a key the page says what to do and where, and calls nothing. - [ ] A click shows its result at once; a dropped request cannot freeze the screen. - [ ] On the sandbox: ask "add acme.com and qualify it", press Confirm, see the card done and the change in the thread at app.outlevo.com. - [ ] Nothing about Outlevo appears on a screen, email or help page your customers can reach. Laravel client, webhook controller and keys: https://developers.outlevo.com/quickstarts/laravel.md. In Filament, keep the page's panels out of the first render (Livewire `wire:init` or plain `fetch` from Alpine) and keep chat state in the browser: a `wire:model` per keystroke and a round trip for every click are what make these panels slow. --- # Outlevo quickstart for Bolt 1. In Outlevo (app.outlevo.com): **Developers** → **New test key** (sandbox: fake data, no credits). Only an owner or admin can create keys. 2. Put OUTLEVO_KEY in the project's server environment (.env, not exposed with a VITE_/NEXT_PUBLIC_ prefix). 3. Paste this prompt: > Read https://developers.outlevo.com/llms.txt and https://developers.outlevo.com/AGENTS.md. Using @outlevo/sdk (npm install https://developers.outlevo.com/outlevo-sdk-0.4.0.tgz) on the server only: list my Outlevo sandbox companies, qualify one unresearched company (quote first, then confirm), wait for the job, and show the result. Add a webhook route that verifies Outlevo-Signature with OUTLEVO_WEBHOOK_SECRET and logs company.qualified events. Never put OUTLEVO_KEY in frontend code. 4. For Readiness Cards in your UI, `npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz`, add a server route that holds the key and forwards `/v1/handoffs…` to the API, and render `` (see https://developers.outlevo.com/components.html). Switch to a live key only on the server, after your plan includes it. ## Chat-first: put Outlevo's assistant in your app Your users run outbound by talking to it: "add acme.com and qualify it", "how is the RevOps campaign doing?". Create the key with the **Assistant** scope (read and write) plus the scopes of the work (Companies, Campaigns), then paste: > Read https://developers.outlevo.com/llms.txt (section "Chat-first"). Add a page with Outlevo's assistant: a server route /api/outlevo that holds OUTLEVO_KEY and forwards /v1/assistant/* (and the paths in confirm cards) to https://api.outlevo.com with an Idempotency-Key on writes, and `` from @outlevo/components (npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz) on the page. Show the cards it returns; run a confirm card only when the user presses Confirm. Never put OUTLEVO_KEY in frontend code. --- # Outlevo in ChatGPT Outlevo is a remote MCP server. ChatGPT connects to it as a custom app (connector) and signs in with OAuth: no API key to copy. 1. In ChatGPT settings, open **Apps** (connectors). If your plan asks for it, turn on developer mode under the advanced settings. 2. Create an app named Outlevo with the MCP server URL `https://api.outlevo.com/mcp` and OAuth as the authentication. ChatGPT registers itself; no client ID or secret is needed. 3. Outlevo opens; sign in, check the workspace, set the credits the assistant may spend per day and per month, and press **Allow**. Only an owner or admin of the workspace can allow it. 4. In a chat, pick the Outlevo app and ask, for example: "How is my RevOps campaign doing?" or "Qualify these ten domains and tell me the credit cost first." What it can do: everything you can do in the workspace's companies, contacts, campaigns, ICP and research, within the caps you set. Paid steps come back with a credit estimate first and run only when you confirm. Nothing is sent by the app: `request_launch` returns a link where an owner or admin reviews the first emails and approves. The sign-in lasts 12 hours and renews itself for 30 days of use. To disconnect, remove the app in ChatGPT or revoke its key in Outlevo under **Developers** → **API keys**. --- # Outlevo quickstart for Claude Code 1. In Outlevo (app.outlevo.com): **Developers** → **New test key** (sandbox: fake data, no credits). Only an owner or admin can create keys. 2. Keep OUTLEVO_KEY in your shell or .env (gitignored). 3. Paste this prompt: > Read https://developers.outlevo.com/llms.txt and https://developers.outlevo.com/AGENTS.md. Using @outlevo/sdk (npm install https://developers.outlevo.com/outlevo-sdk-0.4.0.tgz) on the server only: list my Outlevo sandbox companies, qualify one unresearched company (quote first, then confirm), wait for the job, and show the result. Add a webhook route that verifies Outlevo-Signature with OUTLEVO_WEBHOOK_SECRET and logs company.qualified events. Never put OUTLEVO_KEY in frontend code. 4. For Readiness Cards in your UI, `npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz`, add a server route that holds the key and forwards `/v1/handoffs…` to the API, and render `` (see https://developers.outlevo.com/components.html). ## MCP Sign in with OAuth (no key to copy): ```bash claude mcp add --transport http outlevo https://api.outlevo.com/mcp ``` Then run `/mcp` in Claude Code, pick outlevo and choose **Authenticate**. Outlevo opens in your browser; sign in, check the workspace, set the credits Claude Code may spend per day and per month, and press **Allow**. Only an owner or admin of the workspace can allow it. The sign-in lasts 12 hours and renews itself for 30 days of use; to disconnect, run `claude mcp remove outlevo` or revoke its key in Outlevo under **Developers** → **API keys**. Or with a key you created (a sandbox key for fake data): ```bash claude mcp add --transport http outlevo https://api.outlevo.com/mcp --header "Authorization: Bearer $OUTLEVO_KEY" ``` Ask in plain English, for example: "Which of my Outlevo target accounts fit the ICP best, and why?" Paid steps come back with a credit estimate first and run only when you confirm. What it can do: everything you can do in the workspace's companies, contacts, campaigns, ICP and research, within the caps you set. To build a campaign from the editor (a key with Campaigns and Companies write, Research, and "Acts as me"), ask: "Create an Outlevo campaign for finance leaders at companies like acme.com: find lookalikes, add them, pick an angle, draft the emails and request the launch." Nothing is sent: `request_launch` returns a link where an owner or admin of the workspace reviews the first emails and approves. Switch to a live key only on the server, after your plan includes it. ## Chat-first: put Outlevo's assistant in your app Your users run outbound by talking to it: "add acme.com and qualify it", "how is the RevOps campaign doing?". Create the key with the **Assistant** scope (read and write) plus the scopes of the work (Companies, Campaigns), then paste: > Read https://developers.outlevo.com/llms.txt (section "Chat-first"). Add a page with Outlevo's assistant: a server route /api/outlevo that holds OUTLEVO_KEY and forwards /v1/assistant/* (and the paths in confirm cards) to https://api.outlevo.com with an Idempotency-Key on writes, and `` from @outlevo/components (npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz) on the page. Show the cards it returns; run a confirm card only when the user presses Confirm. Never put OUTLEVO_KEY in frontend code. --- # Outlevo in Claude (claude.ai and the Claude apps) Outlevo is a remote MCP server. Claude connects to it as a custom connector and signs in with OAuth: no API key to copy. 1. In Claude: **Settings** → **Connectors** → **Add custom connector**. 2. Name it Outlevo and enter the URL `https://api.outlevo.com/mcp`. Leave the OAuth client fields empty: Claude registers itself. 3. Press **Connect**. Outlevo opens; sign in, check the workspace, set the credits the assistant may spend per day and per month, and press **Allow**. Only an owner or admin of the workspace can allow it. 4. In a chat, turn the Outlevo connector on and ask, for example: "Which of my target accounts fit the ICP best, and why?" or "Create an Outlevo campaign for finance leaders at companies like acme.com and draft the emails." What it can do: everything you can do in the workspace's companies, contacts, campaigns, ICP and research, within the caps you set. Paid steps come back with a credit estimate first and run only when you confirm. Nothing is sent by the connector: `request_launch` returns a link where an owner or admin reviews the first emails and approves. The sign-in lasts 12 hours and renews itself for 30 days of use. To disconnect, remove the connector in Claude or revoke its key in Outlevo under **Developers** → **API keys**. For Claude Code (OAuth or a sandbox key), see https://developers.outlevo.com/quickstarts/claude-code.md; for Cursor, https://developers.outlevo.com/quickstarts/cursor.md; for Gemini CLI, https://developers.outlevo.com/quickstarts/gemini-cli.md. --- # Outlevo quickstart for Cursor 1. In Outlevo (app.outlevo.com): **Developers** → **New test key** (sandbox: fake data, no credits). Only an owner or admin can create keys. 2. Keep OUTLEVO_KEY in .env (gitignored). 3. Paste this prompt: > Read https://developers.outlevo.com/llms.txt and https://developers.outlevo.com/AGENTS.md. Using @outlevo/sdk (npm install https://developers.outlevo.com/outlevo-sdk-0.4.0.tgz) on the server only: list my Outlevo sandbox companies, qualify one unresearched company (quote first, then confirm), wait for the job, and show the result. Add a webhook route that verifies Outlevo-Signature with OUTLEVO_WEBHOOK_SECRET and logs company.qualified events. Never put OUTLEVO_KEY in frontend code. 4. For Readiness Cards in your UI, `npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz`, add a server route that holds the key and forwards `/v1/handoffs…` to the API, and render `` (see https://developers.outlevo.com/components.html). ## MCP Sign in with OAuth (no key to copy). Add to `.cursor/mcp.json` (or `~/.cursor/mcp.json` for every project): ```json { "mcpServers": { "outlevo": { "url": "https://api.outlevo.com/mcp" } } } ``` Then open Cursor Settings → **MCP** and press the sign-in button next to outlevo. Outlevo opens in your browser; sign in, check the workspace, set the credits Cursor may spend per day and per month, and press **Allow**: the browser hands the sign-in back to Cursor. Only an owner or admin of the workspace can allow it. The sign-in lasts 12 hours and renews itself for 30 days of use; to disconnect, remove outlevo from `mcp.json` or revoke its key in Outlevo under **Developers** → **API keys**. Or with a key you created (a sandbox key for fake data): ```json { "mcpServers": { "outlevo": { "url": "https://api.outlevo.com/mcp", "headers": { "Authorization": "Bearer ${env:OUTLEVO_KEY}" } } } } ``` Ask the agent in plain English, for example: "Which of my Outlevo target accounts fit the ICP best, and why?" Paid steps come back with a credit estimate first and run only when you confirm. What it can do: everything you can do in the workspace's companies, contacts, campaigns, ICP and research, within the caps you set. To build a campaign from the editor (a key with Campaigns and Companies write, Research, and "Acts as me"), ask: "Create an Outlevo campaign for finance leaders at companies like acme.com: find lookalikes, add them, pick an angle, draft the emails and request the launch." Nothing is sent: `request_launch` returns a link where an owner or admin of the workspace reviews the first emails and approves. Switch to a live key only on the server, after your plan includes it. ## Chat-first: put Outlevo's assistant in your app Your users run outbound by talking to it: "add acme.com and qualify it", "how is the RevOps campaign doing?". Create the key with the **Assistant** scope (read and write) plus the scopes of the work (Companies, Campaigns), then paste: > Read https://developers.outlevo.com/llms.txt (section "Chat-first"). Add a page with Outlevo's assistant: a server route /api/outlevo that holds OUTLEVO_KEY and forwards /v1/assistant/* (and the paths in confirm cards) to https://api.outlevo.com with an Idempotency-Key on writes, and `` from @outlevo/components (npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz) on the page. Show the cards it returns; run a confirm card only when the user presses Confirm. Never put OUTLEVO_KEY in frontend code. --- # Outlevo quickstart for Gemini CLI ## MCP Sign in with OAuth (no key to copy): ```bash gemini mcp add --transport http outlevo https://api.outlevo.com/mcp ``` Then run `/mcp auth outlevo` in Gemini CLI. Outlevo opens in your browser; sign in, check the workspace, set the credits Gemini CLI may spend per day and per month, and press **Allow**: the browser hands the sign-in back to Gemini CLI on localhost. Only an owner or admin of the workspace can allow it. The sign-in lasts 12 hours and renews itself for 30 days of use; to disconnect, run `gemini mcp remove outlevo` or revoke its key in Outlevo under **Developers** → **API keys**. Or with a key you created (a sandbox key for fake data: **Developers** → **New test key**): ```bash gemini mcp add --transport http --header "Authorization: Bearer $OUTLEVO_KEY" outlevo https://api.outlevo.com/mcp ``` The same in `~/.gemini/settings.json` (or `.gemini/settings.json` in a project): ```json { "mcpServers": { "outlevo": { "httpUrl": "https://api.outlevo.com/mcp", "headers": { "Authorization": "Bearer $OUTLEVO_KEY" } } } } ``` Ask Gemini CLI in plain English, for example: "Which of my Outlevo target accounts fit the ICP best, and why?" Paid steps come back with a credit estimate first and run only when you confirm. What it can do: everything you can do in the workspace's companies, contacts, campaigns, ICP and research, within the caps you set. To build a campaign from the terminal (a key with Campaigns and Companies write, Research, and "Acts as me"), ask: "Create an Outlevo campaign for finance leaders at companies like acme.com: find lookalikes, add them, pick an angle, draft the emails and request the launch." Nothing is sent: `request_launch` returns a link where an owner or admin of the workspace reviews the first emails and approves. This is Gemini CLI, Google's open-source terminal agent. The Gemini app in the browser is not covered here. ## Your own code For the API, the SDK and webhooks, follow the [Claude Code quickstart](claude-code.md) or [Cursor quickstart](cursor.md): the prompt works the same in any coding agent. --- # Outlevo quickstart for Lovable 1. In Outlevo (app.outlevo.com): **Developers** → **New test key** (sandbox: fake data, no credits). Only an owner or admin can create keys. 2. Add OUTLEVO_KEY under Supabase → Edge Function secrets (Lovable projects use Supabase). Edge Functions run on Deno: if the SDK will not install there, the code can call the REST API with fetch instead (the "TypeScript / Node without the SDK" section of llms.txt). 3. Paste this prompt: > Read https://developers.outlevo.com/llms.txt and https://developers.outlevo.com/AGENTS.md. Using @outlevo/sdk (npm install https://developers.outlevo.com/outlevo-sdk-0.4.0.tgz) on the server only: list my Outlevo sandbox companies, qualify one unresearched company (quote first, then confirm), wait for the job, and show the result. Add a webhook route that verifies Outlevo-Signature with OUTLEVO_WEBHOOK_SECRET and logs company.qualified events. Never put OUTLEVO_KEY in frontend code. 4. For Readiness Cards in your UI, `npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz`, add a server route that holds the key and forwards `/v1/handoffs…` to the API, and render `` (see https://developers.outlevo.com/components.html). Switch to a live key only on the server, after your plan includes it. ## Chat-first: put Outlevo's assistant in your app Your users run outbound by talking to it: "add acme.com and qualify it", "how is the RevOps campaign doing?". Create the key with the **Assistant** scope (read and write) plus the scopes of the work (Companies, Campaigns), then paste: > Read https://developers.outlevo.com/llms.txt (section "Chat-first"). Add a page with Outlevo's assistant: a server route /api/outlevo that holds OUTLEVO_KEY and forwards /v1/assistant/* (and the paths in confirm cards) to https://api.outlevo.com with an Idempotency-Key on writes, and `` from @outlevo/components (npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz) on the page. Show the cards it returns; run a confirm card only when the user presses Confirm. Never put OUTLEVO_KEY in frontend code. --- # Outlevo quickstart for Replit 1. In Outlevo (app.outlevo.com): **Developers** → **New test key** (sandbox: fake data, no credits). Only an owner or admin can create keys. 2. Add OUTLEVO_KEY in Secrets (Tools → Secrets). 3. Paste this prompt: > Read https://developers.outlevo.com/llms.txt and https://developers.outlevo.com/AGENTS.md. Using @outlevo/sdk (npm install https://developers.outlevo.com/outlevo-sdk-0.4.0.tgz) on the server only: list my Outlevo sandbox companies, qualify one unresearched company (quote first, then confirm), wait for the job, and show the result. Add a webhook route that verifies Outlevo-Signature with OUTLEVO_WEBHOOK_SECRET and logs company.qualified events. Never put OUTLEVO_KEY in frontend code. 4. For Readiness Cards in your UI, `npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz`, add a server route that holds the key and forwards `/v1/handoffs…` to the API, and render `` (see https://developers.outlevo.com/components.html). Switch to a live key only on the server, after your plan includes it. ## Chat-first: put Outlevo's assistant in your app Your users run outbound by talking to it: "add acme.com and qualify it", "how is the RevOps campaign doing?". Create the key with the **Assistant** scope (read and write) plus the scopes of the work (Companies, Campaigns), then paste: > Read https://developers.outlevo.com/llms.txt (section "Chat-first"). Add a page with Outlevo's assistant: a server route /api/outlevo that holds OUTLEVO_KEY and forwards /v1/assistant/* (and the paths in confirm cards) to https://api.outlevo.com with an Idempotency-Key on writes, and `` from @outlevo/components (npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz) on the page. Show the cards it returns; run a confirm card only when the user presses Confirm. Never put OUTLEVO_KEY in frontend code. --- # Outlevo quickstart for v0 1. In Outlevo (app.outlevo.com): **Developers** → **New test key** (sandbox: fake data, no credits). Only an owner or admin can create keys. 2. Add OUTLEVO_KEY in the Vercel project's Environment Variables (server only). 3. Paste this prompt: > Read https://developers.outlevo.com/llms.txt and https://developers.outlevo.com/AGENTS.md. Using @outlevo/sdk (npm install https://developers.outlevo.com/outlevo-sdk-0.4.0.tgz) on the server only: list my Outlevo sandbox companies, qualify one unresearched company (quote first, then confirm), wait for the job, and show the result. Add a webhook route that verifies Outlevo-Signature with OUTLEVO_WEBHOOK_SECRET and logs company.qualified events. Never put OUTLEVO_KEY in frontend code. 4. For Readiness Cards in your UI, `npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz`, add a server route that holds the key and forwards `/v1/handoffs…` to the API, and render `` (see https://developers.outlevo.com/components.html). Switch to a live key only on the server, after your plan includes it. ## Chat-first: put Outlevo's assistant in your app Your users run outbound by talking to it: "add acme.com and qualify it", "how is the RevOps campaign doing?". Create the key with the **Assistant** scope (read and write) plus the scopes of the work (Companies, Campaigns), then paste: > Read https://developers.outlevo.com/llms.txt (section "Chat-first"). Add a page with Outlevo's assistant: a server route /api/outlevo that holds OUTLEVO_KEY and forwards /v1/assistant/* (and the paths in confirm cards) to https://api.outlevo.com with an Idempotency-Key on writes, and `` from @outlevo/components (npm install https://developers.outlevo.com/outlevo-components-0.3.0.tgz) on the page. Show the cards it returns; run a confirm card only when the user presses Confirm. Never put OUTLEVO_KEY in frontend code.