Skip to content New SourceLoop MCP: chat with your attribution data in Claude, ChatGPT & Cursor
SourceLoop
API

Authentication

How to create an API key, send it, scope it to the right permissions, and keep it out of your browser bundle.

Every request carries a SourceLoop API key as a bearer token. There is no separate login step, no token exchange, and no expiry to refresh.

curl -s "https://app.sourceloop.ai/api/v1/me" \
  -H "Authorization: Bearer $SOURCELOOP_API_KEY"

Keys look like slk_live_…. If you prefer a dedicated header, X-API-Key is accepted and behaves identically. Never pass a key in the query string: URLs end up in server logs, browser history, and referrer headers.

Create a key

In the app, go to Settings, Developers, API keys and create one. The full key is shown once, at creation. We store only a hash of it, so a lost key is replaced rather than recovered.

Two things to decide when you create it:

  • Which websites it covers. A key can be scoped to one website or to every website in the workspace. Agency keys usually cover all of them, so one credential can pull every client.
  • Which scopes it carries. See below.

Scopes

A key only does what its scopes allow. Ask for the narrowest set that makes your integration work, so a leaked reporting key cannot move a deal.

ScopeGrants
metrics:readAggregated metrics, breakdowns, timeseries, funnels, paths, products, ad performance, attribution coverage
conversions:readThe contact ledger, single contacts, their journeys, and /v1/changes
conversions:writeUpdate a contact’s status, value or notes
companies:readCompanies, firmographics, pipeline rollups, company journeys
companies:writeUpdate company firmographics
deals:readDeals, pipelines and stages, deal values, deal journeys
deals:writeMove a deal or change its value, written through to the CRM that owns it
events:writeSend server-side events
pii:readReturn real email addresses, phone numbers and names instead of masked ones

pii:read is the one to think hardest about, and the one to be deliberate about at creation time: new keys include it by default. A key without it still works, but email, phone and name come back masked. Leave it off for anything analytical, and for any key you hand to an AI assistant. See Data provenance and PII ».

Three endpoints need no scope at all beyond a valid key: GET /v1/me, GET /v1/websites, and GET /v1/schema.

Check what a key can do

GET /v1/me answers it directly, which makes it the right first call in any integration and the right thing to log when something returns 403.

curl -s "https://app.sourceloop.ai/api/v1/me" \
  -H "Authorization: Bearer $SOURCELOOP_API_KEY"

A request that is missing a scope fails with 403 and an insufficient-scope problem document naming the scope it wanted. You do not have to guess.

Where to keep the key

Server side only. The API is built for server-to-server and agent use, and a key in a browser bundle is a key in every visitor’s devtools. We deliberately do not reflect an origin for browser calls.

If you want attribution from browser code, that is what the tracking pixel and the SDK are for. See Install the SourceLoop SDK », which uses a public websiteId rather than a secret key.

Rotating and revoking

Create the replacement first, deploy it, then revoke the old one. Revocation takes effect immediately, and a revoked key returns 401 on the next call. Every key records when it was last used, so you can tell which are dormant before you remove them.

Rate limits are counted per workspace, not per key, so minting a second key does not buy a second budget. See Errors and rate limits ».

Track every conversion to its true source

Capture and send full attribution data from every signup, lead, booking, and sale to your CRM and ad platforms, so you know exactly what's driving revenue.

Without SourceLoop

Untagged

Kayden Floyd

kayden@abc.com

  • SourceUnknown
  • MediumUnknown
  • CampaignUnknown
  • Landing pageUnknown
Journey
No touchpoints captured

With SourceLoop

Auto-tagged

Kayden Floyd

kayden@abc.com · Acme Co.

  • Channel Paid Social
  • CampaignFree_demo
  • Landing page/pricing
Journey
Synced to HubSpot Google Ads Meta