WinLayer Docs
Product documentation · Beta behavior. A documented path is not production acceptance; availability still depends on source health, workspace plan, provider setup, and deployed evidence.

Your first API call

Five minutes from zero to your scored opportunities in a terminal.

1. Create an API key

Open /developer (owner or admin role required), name the key after the system that will use it, select Sandbox, and keep opportunities:read. Copy the wl_test_… value. It is shown once; only its hash is stored.

2. Call the API

bash
export WINLAYER_KEY="wl_test_..."

curl -s \
  -H "Authorization: Bearer $WINLAYER_KEY" \
  "https://api.winlayer.ai/api/v1/public/opportunities?limit=5&min=40"

3. Read the response

Sandbox opportunities use stable pre-scored fixtures; live opportunities are scored against your workspace's company profile:

json
{
  "sandbox": true,
  "count": 3,
  "opportunities": [
    {
      "id": "sandbox-opportunity-budget-001",
      "title": "Cloud Operations Modernization Forecast",
      "agency": "Department of the Treasury",
      "fitScore": 91,
      "winProbability": 68,
      "recommendation": "pursue",
      "responseDeadline": "2027-02-15T17:00:00.000Z",
      "link": "https://sandbox.winlayer.ai/evidence/budget-001"
    }
  ]
}

fitScore below 40 usually means the opportunity barely touches your profile — filter with min so integrations only see real candidates. Empty result with a note about a missing profile? Run the setup wizard first.

4. Switch to production data

Create a wl_live_… API key with the minimum scopes your integration needs, change the secret in your runtime, verify the same request, then revoke the sandbox key.

5. Handle limits from day one

You get 120 requests/min per key. Watch X-RateLimit-Remaining and back off on 429 — details in Rate limits.

Next: pull your tracked pipeline instead of the whole radar — Sync your pipeline to a CRM.