{"name":"bridgly","version":"1.0.0","baseUrl":"https://www.bridgly.co","auth":{"type":"bearer","header":"Authorization","format":"Bearer ak_live_…","where":"Workspace settings → API keys"},"errors":{"401":"Missing or invalid API key (including revoked)","403":"Policy denial (e.g. self-referral blocked on track)","404":"Resource not found","429":"Rate limit exceeded (120 requests / minute per project across v1 + track; honor Retry-After)"},"responseShapes":{"v1Success":"{ \"data\": … }","v1Error":"{ \"error\": \"…\" }","trackSuccess":"{ \"ok\": true, \"conversionId\", \"clickId\", \"referrerId\", \"duplicate\", … }","trackError":"{ \"error\": \"…\" }"},"openapi":"/openapi.json","tools":[{"name":"search_products","description":"Public, no auth. Real products from brands open to AI agents: brand, title, option, price, inStock, imageUrl, commissionPercent, agentEarnsPercent, offerId, variantId. Understands price limits (\"pimple patch under $20\"). Then call create_recommendation with offerId and variantId for a checkout link for that exact item.","method":"GET","path":"/api/v1/products","params":{"q":{"in":"query","type":"string","required":true},"offerId":{"in":"query","type":"string","required":false},"inStock":{"in":"query","type":"string","required":false},"limit":{"in":"query","type":"integer","required":false}},"errors":["400","503"],"example":{"curl":"curl \"https://www.bridgly.co/api/v1/products?q=pimple+patch+under+%2420&inStock=1\""}},{"name":"search_offers","description":"Public, no auth. Brands open to AI agents: offerId, brand, commissionPercent, cookieWindowDays, destinationUrl. Then call create_recommendation with a network key (agkey_… from Home → Your AI agent) and offerId to get a tracked shareUrl; you join the brand automatically.","method":"GET","path":"/api/v1/catalog","params":{"q":{"in":"query","type":"string","required":false},"category":{"in":"query","type":"string","required":false},"limit":{"in":"query","type":"integer","required":false}},"errors":["429"],"example":{"curl":"curl https://www.bridgly.co/api/v1/catalog?q=tent"}},{"name":"get_stats_summary","description":"Project click, lead, sale, and revenue totals for the API key’s project.","method":"GET","path":"/api/v1/stats/summary","params":{},"errors":["401","429"],"example":{"curl":"curl https://www.bridgly.co/api/v1/stats/summary -H \"Authorization: Bearer $PROJECT_API_KEY\""}},{"name":"get_funnel","description":"Workspace funnel: clicks → leads → sales → revenue for the workspace that owns the key’s project.","method":"GET","path":"/api/v1/stats/funnel","params":{},"errors":["401","429"],"example":{"curl":"curl https://www.bridgly.co/api/v1/stats/funnel -H \"Authorization: Bearer $PROJECT_API_KEY\""}},{"name":"list_links","description":"List short links for the project with per-link click counts.","method":"GET","path":"/api/v1/links","params":{},"errors":["401","429"],"example":{"curl":"curl https://www.bridgly.co/api/v1/links -H \"Authorization: Bearer $PROJECT_API_KEY\""}},{"name":"create_link","description":"Create a short link on the API key’s project. Requires at least one destination (web, ios, or android).","method":"POST","path":"/api/v1/links","params":{"slug":{"in":"body","type":"string","required":false},"destinations":{"in":"body","type":"object","required":true,"description":"{ web?, ios?, android? } — at least one URL"},"expiresAt":{"in":"body","type":"string","required":false},"domainId":{"in":"body","type":"string","required":false}},"errors":["400","401","429"],"example":{"curl":"curl -X POST https://www.bridgly.co/api/v1/links -H \"Authorization: Bearer $PROJECT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"slug\":\"spring\",\"destinations\":{\"web\":\"https://example.com\"}}'"}},{"name":"get_payouts_summary","description":"Workspace partner balances: available, held, and payable cents per partner plus totals.","method":"GET","path":"/api/v1/payouts/summary","params":{},"errors":["401","429"],"example":{"curl":"curl https://www.bridgly.co/api/v1/payouts/summary -H \"Authorization: Bearer $PROJECT_API_KEY\""}},{"name":"list_conversions","description":"Recent leads/sales for the project. Paginate with before=ISO timestamp from nextBefore.","method":"GET","path":"/api/v1/conversions","params":{"limit":{"in":"query","type":"integer","required":false,"description":"1–100, default 25"},"before":{"in":"query","type":"string","required":false,"description":"ISO created_at cursor"},"type":{"in":"query","type":"string","required":false,"description":"lead | sale"}},"errors":["400","401","429"],"example":{"curl":"curl \"https://www.bridgly.co/api/v1/conversions?limit=25&type=sale\" -H \"Authorization: Bearer $PROJECT_API_KEY\""}},{"name":"list_partners","description":"List partners (referrers) in the workspace: id, name, code, status.","method":"GET","path":"/api/v1/partners","params":{},"errors":["401","429"],"example":{"curl":"curl https://www.bridgly.co/api/v1/partners -H \"Authorization: Bearer $PROJECT_API_KEY\""}},{"name":"get_partner_stats","description":"Clicks, leads, sales, and revenue for one partner in the workspace.","method":"GET","path":"/api/v1/partners/{id}/stats","params":{"id":{"in":"path","type":"string","format":"uuid","required":true,"description":"Partner (referrer) id"}},"errors":["401","404","429"],"example":{"curl":"curl https://www.bridgly.co/api/v1/partners/<partner_id>/stats -H \"Authorization: Bearer $PROJECT_API_KEY\""}},{"name":"track_lead","description":"Record a partner lead. Prefer clickId when known; otherwise Bridgly may stitch via customerExternalId.","method":"POST","path":"/api/track/lead","params":{"customerExternalId":{"in":"body","type":"string","required":true},"eventName":{"in":"body","type":"string","required":true},"clickId":{"in":"body","type":"string","required":false},"storeSessionId":{"in":"body","type":"string","required":false},"bridgly_session_id":{"in":"body","type":"string","required":false},"referrerId":{"in":"body","type":"string","required":false},"referralCode":{"in":"body","type":"string","required":false},"agentId":{"in":"body","type":"string","required":false},"agentSurface":{"in":"body","type":"string","required":false},"agentProtocol":{"in":"body","type":"string","required":false},"metadata":{"in":"body","type":"object","required":false}},"errors":["400","401","403","429"],"example":{"curl":"curl -X POST https://www.bridgly.co/api/track/lead -H \"Authorization: Bearer $PROJECT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"customerExternalId\":\"user_123\",\"eventName\":\"signup\"}'"}},{"name":"track_sale","description":"Record a partner sale with amountCents. Use invoiceId for idempotent duplicates when supported. Verified agent attribution: pass attributionToken (brt_… from create_recommendation) — single-use, wins over other attribution. Legacy claimed tier: referrerId/referralCode plus agentId/agentSurface/agentProtocol.","method":"POST","path":"/api/track/sale","params":{"customerExternalId":{"in":"body","type":"string","required":true},"eventName":{"in":"body","type":"string","required":true},"amountCents":{"in":"body","type":"integer","required":false},"currency":{"in":"body","type":"string","required":false},"invoiceId":{"in":"body","type":"string","required":false},"paymentProcessor":{"in":"body","type":"string","required":false},"clickId":{"in":"body","type":"string","required":false},"attributionToken":{"in":"body","type":"string","required":false},"storeSessionId":{"in":"body","type":"string","required":false},"bridgly_session_id":{"in":"body","type":"string","required":false},"referrerId":{"in":"body","type":"string","required":false},"referralCode":{"in":"body","type":"string","required":false},"agentId":{"in":"body","type":"string","required":false},"agentSurface":{"in":"body","type":"string","required":false},"agentProtocol":{"in":"body","type":"string","required":false},"metadata":{"in":"body","type":"object","required":false}},"errors":["400","401","403","429"],"example":{"curl":"curl -X POST https://www.bridgly.co/api/track/sale -H \"Authorization: Bearer ***\" -H \"Content-Type: application/json\" -d '{\"customerExternalId\":\"user_123\",\"eventName\":\"purchase\",\"amountCents\":4999,\"currency\":\"usd\",\"invoiceId\":\"inv_abc\",\"attributionToken\":\"brt_...\"}'"}},{"name":"create_recommendation","description":"Agent keys only (agkey_…). Record that this agent surfaced an offer; returns a single-use signed attributionToken (brt_…) for track_sale, plus shareUrl when shortLinkId is given — share that link and a conversion from its click auto-verifies (no token handling needed at checkout). Send Idempotency-Key to dedupe. Network keys (one key, every brand): pass offerId from search_offers; shareUrl is returned automatically. Optional variantId (from search_products) makes shareUrl open checkout with that exact item in the cart.","method":"POST","path":"/api/v1/recommendations","params":{"itemRef":{"in":"body","type":"string","required":false},"projectId":{"in":"body","type":"string","required":false},"shortLinkId":{"in":"body","type":"string","required":false},"context":{"in":"body","type":"object","required":false},"ttlSeconds":{"in":"body","type":"integer","required":false},"offerId":{"in":"body","type":"string","required":false},"variantId":{"in":"body","type":"string","required":false}},"errors":["400","401","403","404","429","503"],"example":{"curl":"curl -X POST https://www.bridgly.co/api/v1/recommendations -H \"Authorization: Bearer agkey_live_...\" -H \"Content-Type: application/json\" -H \"Idempotency-Key: rec-123\" -d '{\"itemRef\":\"sku_hiking_tent\",\"context\":{\"query\":\"best ultralight tent\"}}'"}}],"mcp":{"url":"https://www.bridgly.co/api/mcp","transport":"streamable-http","tools":["search_offers","get_link"],"auth":"Authorization: Bearer agkey_… (network key; only get_link)"}}