{"openapi":"3.1.0","info":{"title":"LeadWebia API","description":"\nThe LeadWebia API finds local businesses on Google Maps with their contacts and\nwebsite checks, and manages them as your leads, the same way the app does.\n\n**Authentication.** Create an API key in the app (the API page, leadwebia.com/api) and send it as\n`Authorization: Bearer lw_live_…` (or `X-API-Key: lw_live_…`). Keys work on every plan;\nsome endpoints need a paid plan or a credit pack, like in the app.\n\n**Credits.** The same balance as the app. A search reserves `max_leads` credits and charges\n1 per business delivered (unused credits come back); a new prospect report costs 20.\nEverything else is free.\n\n**Errors** always look like `{\"error\": {\"code\", \"message\", \"status\", \"request_id\", \"docs_url\"}}`.\n\n**Rate limits.** 60 requests a minute per key, 120 per account, 10 credit-spending requests a\nminute per account. Every answer has `X-RateLimit-Limit`, `X-RateLimit-Remaining` and\n`X-RateLimit-Reset`; over the limit you get `429 rate_limited` with `Retry-After`.\n\nGuide: https://leadwebia.com/docs/api\n","contact":{"name":"LeadWebia support","url":"https://leadwebia.com/support"},"version":"1.0.0"},"servers":[{"url":"/api/v1"},{"url":"https://api.leadwebia.com/api/v1","description":"Production"}],"paths":{"/me":{"get":{"tags":["Account"],"summary":"Account, plan and credits","description":"The key's user: plan, credits left, report cost, how many searches can run at once and the integrations connected in the app. Use it to test a key. Costs nothing.","operationId":"get_me_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/lead-statuses":{"get":{"tags":["Account"],"summary":"CRM statuses","description":"The user's CRM pipeline in order. Use a status id or title in PATCH /leads/{place_id}. Costs nothing.","operationId":"lead_statuses_lead_statuses_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LeadStatus"},"type":"array","title":"Response Lead Statuses Lead Statuses Get"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/locations":{"get":{"tags":["Locations"],"summary":"Find search areas","description":"The search areas for a city name (exact name first, then the biggest places). Pass the chosen `area_id`s to POST /searches. In the US an area is the city itself. Costs nothing.","operationId":"find_locations_locations_get","parameters":[{"name":"city","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":80,"description":"City or town, e.g. Austin","title":"City"},"description":"City or town, e.g. Austin"},{"name":"country","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":2,"description":"ISO 3166-1 alpha-2 code","default":"US","title":"Country"},"description":"ISO 3166-1 alpha-2 code"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"description":"State or region to narrow it down","title":"State"},"description":"State or region to narrow it down"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Areas"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/searches":{"post":{"tags":["Searches"],"summary":"Start a lead search","description":"Searches Google Maps for local businesses in the given niches and areas and saves them as leads, adding phones, emails, socials and website checks. **Spends credits:** reserves `max_leads` now and charges 1 per business delivered (with `only_with_email`, 1 per business delivered with an email); the rest come back. Runs in the background for a few minutes: poll GET /searches/{search_id} or GET /leads?since=, or subscribe to webhooks. Send an `Idempotency-Key` header so a retry never starts (or charges) twice.","operationId":"create_search_searches_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSearch"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Search"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"402":{"description":"Not enough credits (`insufficient_credits`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"409":{"description":"Conflict (see the error code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"200":{"description":"Replay of an Idempotency-Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Search"}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]},"get":{"tags":["Searches"],"summary":"List searches","description":"The user's searches, newest first, each with the state of its latest run. With `updated_since` it is a cursor feed instead: every run change after the cursor, oldest first (`0` = from the beginning, `now` = from now on); store `next_cursor` and pass it next time. The feed lists changes older than a minute, so none is ever missed.","operationId":"list_searches_searches_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(queued|running|delivered|completed|failed)$"},{"type":"null"}],"description":"Only searches whose latest run has this status","title":"Status"},"description":"Only searches whose latest run has this status"},{"name":"updated_since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Cursor feed (see above)","title":"Updated Since"},"description":"Cursor feed (see above)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Page_Search_"},{"$ref":"#/components/schemas/Feed_Search_"}],"title":"Response List Searches Searches Get"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/searches/{search_id}":{"get":{"tags":["Searches"],"summary":"Get a search","description":"A search with the state of its latest run: status, businesses delivered, credits reserved and charged, progress. Leads arrive while it runs (GET /leads?search_id=). Costs nothing.","operationId":"get_search_searches__search_id__get","parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"integer","title":"Search Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Search"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/searches/{search_id}/runs":{"get":{"tags":["Searches"],"summary":"Runs of a search","description":"Every run of a search (the first one and each POST /searches/{id}/more), newest first.","operationId":"search_runs_searches__search_id__runs_get","parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"integer","title":"Search Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRuns"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/searches/{search_id}/more":{"post":{"tags":["Searches"],"summary":"Load more results","description":"Finds more businesses for the same niches and area (never the same ones twice). **Spends credits** like POST /searches. A search started with `only_with_email` keeps that mode. `409 search_exhausted` when the area is used up. Send an `Idempotency-Key`.","operationId":"more_results_searches__search_id__more_post","parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"integer","title":"Search Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoreLeads"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Search"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"402":{"description":"Not enough credits (`insufficient_credits`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"409":{"description":"Conflict (see the error code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"200":{"description":"Replay of an Idempotency-Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Search"}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/searches/{search_id}/remaining":{"get":{"tags":["Searches"],"summary":"Businesses left in the area","description":"An estimate of how many more businesses POST /searches/{id}/more could still find. Costs nothing.","operationId":"remaining_searches__search_id__remaining_get","parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"integer","title":"Search Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Remaining"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/leads":{"get":{"tags":["Leads"],"summary":"List or poll leads","description":"The user's saved leads with the Dashboard's filters, `limit`/`offset` pages. With `since` it is a polling feed instead: leads saved after the cursor, oldest first (`0` = from the beginning, `now` = from now on). Store `next_cursor` and pass it next time: no lead is ever missed or repeated. The feed lists leads saved more than a minute ago, and only combines with `search_id` and `q` (the other filters can change after a lead is saved: use the lead.created webhook for those). Costs nothing.","operationId":"list_leads_leads_get","parameters":[{"name":"search_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only the leads of this search","title":"Search Id"},"description":"Only the leads of this search"},{"name":"website","in":"query","required":false,"schema":{"enum":["any","without","with","social_or_directory"],"type":"string","description":"without = no website of their own (a social page or directory counts as none)","default":"any","title":"Website"},"description":"without = no website of their own (a social page or directory counts as none)"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"description":"CRM status id or title, or none","title":"Status"},"description":"CRM status id or title, or none"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"description":"Part of the business name","title":"Q"},"description":"Part of the business name"},{"name":"cms","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Website platform, e.g. WordPress; none = unknown","title":"Cms"},"description":"Website platform, e.g. WordPress; none = unknown"},{"name":"cms_outdated","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"WordPress behind the latest release","title":"Cms Outdated"},"description":"WordPress behind the latest release"},{"name":"uses_ads","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"The website has ad pixels","title":"Uses Ads"},"description":"The website has ad pixels"},{"name":"has_email","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"At least one email found","title":"Has Email"},"description":"At least one email found"},{"name":"sort","in":"query","required":false,"schema":{"enum":["newest","rating","reviews","name","status"],"type":"string","default":"newest","title":"Sort"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Polling cursor (see above)","title":"Since"},"description":"Polling cursor (see above)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Page_LeadBrief_"},{"$ref":"#/components/schemas/Feed_LeadBrief_"}],"title":"Response List Leads Leads Get"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/leads/{place_id}":{"get":{"tags":["Leads"],"summary":"Get a lead","description":"Everything about one lead: contacts (phones, emails, socials), Google rating and reviews, website checks (platform, PageSpeed, SSL, ad pixels, technologies), CRM status and its saved outreach message. Costs nothing.","operationId":"get_lead_leads__place_id__get","parameters":[{"name":"place_id","in":"path","required":true,"schema":{"type":"string","title":"Place Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]},"patch":{"tags":["Leads"],"summary":"Set a lead's CRM status","description":"Moves the lead to one of the user's CRM statuses (id or title from GET /lead-statuses); null or `none` clears it.","operationId":"patch_lead_leads__place_id__patch","parameters":[{"name":"place_id","in":"path","required":true,"schema":{"type":"string","title":"Place Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadStatusChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Leads"],"summary":"Delete a lead","description":"Removes the lead from the user's list. Can't be undone; credits are not returned.","operationId":"delete_lead_leads__place_id__delete","parameters":[{"name":"place_id","in":"path","required":true,"schema":{"type":"string","title":"Place Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Count"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/leads/status":{"post":{"tags":["Leads"],"summary":"Set the CRM status of many leads","description":"Up to 500 `place_ids`, or every lead of a `search_id`. Answers how many leads of the user were matched; other users' ids are ignored.","operationId":"bulk_status_leads_status_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkStatus"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Count"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/leads/delete":{"post":{"tags":["Leads"],"summary":"Delete many leads","description":"Deletes up to 500 leads of the user. Can't be undone; credits are not returned. Other users' ids are ignored.","operationId":"bulk_delete_leads_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDelete"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Count"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/leads/{place_id}/outreach-message":{"post":{"tags":["Leads"],"summary":"Write an outreach message","description":"Writes a personalised cold email (subject + body) to the business, mentioning the problems LeadWebia found (no website, slow site, no SSL…). Saved on the lead, replacing the previous one. LeadWebia does not send it. Up to 300 a day (shared with the MCP).","operationId":"outreach_message_leads__place_id__outreach_message_post","parameters":[{"name":"place_id","in":"path","required":true,"schema":{"type":"string","title":"Place Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutreachIn","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutreachMessage"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"502":{"description":"Upstream failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/exports":{"post":{"tags":["Exports"],"summary":"Export leads to CSV","description":"A CSV (Excel-ready) with every field of the chosen leads: up to 5,000 `place_ids`, or every lead of a `search_id` (optionally only with / without a website). Returns a download link valid for 24 hours. Costs nothing; needs a paid plan or a credit pack, like in the app.","operationId":"create_export_exports_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"403":{"description":"Needs a paid plan or a credit pack (`paid_plan_required` / `professional_plan_required`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/integrations":{"get":{"tags":["Integrations"],"summary":"Connected integrations","description":"The integrations the user connected in the app (Integrations page). Connecting and configuring them is done in the app only.","operationId":"list_integrations_integrations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/integrations/{kind}/targets":{"get":{"tags":["Integrations"],"summary":"Integration destinations","description":"Where leads can go: the user's Instantly campaigns, the Google Sheets LeadWebia created, or their webhook. Paid plans.","operationId":"targets_integrations__kind__targets_get","parameters":[{"name":"kind","in":"path","required":true,"schema":{"enum":["instantly","google_sheets","webhook"],"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Targets"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"403":{"description":"Needs a paid plan or a credit pack (`paid_plan_required` / `professional_plan_required`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"409":{"description":"Conflict (see the error code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"503":{"description":"Feature unavailable right now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/integrations/{kind}/send":{"post":{"tags":["Integrations"],"summary":"Send leads to an integration","description":"Sends `place_ids` (or every lead of a `search_id`) to a connected tool. Leads already in an Instantly campaign or a sheet are skipped; Instantly skips leads without email. Big sends run in the background: follow the `task_id`. Paid plans.","operationId":"send_integrations__kind__send_post","parameters":[{"name":"kind","in":"path","required":true,"schema":{"enum":["instantly","google_sheets","webhook"],"type":"string","title":"Kind"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResult"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"403":{"description":"Needs a paid plan or a credit pack (`paid_plan_required` / `professional_plan_required`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"409":{"description":"Conflict (see the error code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"503":{"description":"Feature unavailable right now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/integrations/sends/{task_id}":{"get":{"tags":["Integrations"],"summary":"Send status","description":"Progress and counts of a background send started by POST /integrations/{kind}/send.","operationId":"send_status_integrations_sends__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResult"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/reports/lookup":{"post":{"tags":["Reports"],"summary":"Find a business","description":"Looks up one business on Google Maps (up to 3 matches) for a report on a business that isn't a lead yet; then POST /reports with `lookup_id` and the chosen `place_id`. 10 a day.","operationId":"lookup_reports_lookup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lookup"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"402":{"description":"Not enough credits (`insufficient_credits`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"502":{"description":"Upstream failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/reports":{"post":{"tags":["Reports"],"summary":"Create a prospect report","description":"Builds the online-presence report of a business (Google profile, reviews, listings, website, a 9-point Maps ranking grid; graded A–F against 3 competitors). **Costs 20 credits** when a new run is needed (refunded if it fails); an existing or running report is returned without charge. Takes 1–3 minutes: poll GET /reports/{place_id} or subscribe to report.ready.","operationId":"create_report_reports_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportIn"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"402":{"description":"Not enough credits (`insufficient_credits`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"409":{"description":"Conflict (see the error code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"503":{"description":"Feature unavailable right now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"200":{"description":"Already ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/reports/{place_id}":{"get":{"tags":["Reports"],"summary":"Get a prospect report","description":"Status of the lead's report and, when ready, its grade, score, sections, top issues and competitors (`full=true` adds the whole snapshot). Costs nothing.","operationId":"get_report_reports__place_id__get","parameters":[{"name":"place_id","in":"path","required":true,"schema":{"type":"string","title":"Place Id"}},{"name":"full","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/reports/{place_id}/share":{"post":{"tags":["Reports"],"summary":"Share a report","description":"A version of a ready report with the user's branding: a public `link` (views are counted) or a `pdf` (a few seconds: call GET /reports/{place_id}/pdf until it is ready). White-label plans (credit pack, Starter, Pro, Agency).","operationId":"share_reports__place_id__share_post","parameters":[{"name":"place_id","in":"path","required":true,"schema":{"type":"string","title":"Place Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareIn","default":{"format":"link","language":"en"}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shared"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"403":{"description":"Needs a paid plan or a credit pack (`paid_plan_required` / `professional_plan_required`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"409":{"description":"Conflict (see the error code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/reports/{place_id}/pdf":{"get":{"tags":["Reports"],"summary":"Branded PDF status","description":"The branded PDF of the report: status, and a short-lived download URL when ready.","operationId":"get_pdf_reports__place_id__pdf_get","parameters":[{"name":"place_id","in":"path","required":true,"schema":{"type":"string","title":"Place Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shared"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"409":{"description":"Conflict (see the error code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/tools/website-check":{"post":{"tags":["Tools"],"summary":"Check a website","description":"Any website: platform (WordPress, Wix…) and version, technologies, ad pixels, SSL certificate and, with `include_pagespeed`, Google PageSpeed scores and Core Web Vitals (20–40 s). Costs nothing.","operationId":"website_check_tools_website_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteCheckIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteCheck"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"502":{"description":"Upstream failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/tools/emails":{"post":{"tags":["Tools"],"summary":"Find a website's emails","description":"The emails, phones and social profiles a website publishes on its home and contact pages. Costs nothing; up to 20 websites an hour per user.","operationId":"find_emails_tools_emails_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteContacts"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"502":{"description":"Upstream failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhooks","description":"The user's webhook subscriptions (created with the API, Zapier, Make or n8n).","operationId":"list_webhooks_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Webhooks"],"summary":"Subscribe a webhook","description":"Sends the chosen events to `url` as signed JSON POSTs (one event per request; header `X-LeadWebia-Signature: sha256=<HMAC-SHA256 of the raw body>`). The answer has the `signing_secret` **once**. Events: lead.created (once per lead, when its contacts are in), search.completed, search.failed, report.ready, report.failed. A receiver answering 410 Gone unsubscribes it. Paid plans; up to 10 webhooks.","operationId":"create_webhook_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"403":{"description":"Needs a paid plan or a credit pack (`paid_plan_required` / `professional_plan_required`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"409":{"description":"Conflict (see the error code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"503":{"description":"Feature unavailable right now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/webhooks/{webhook_id}":{"get":{"tags":["Webhooks"],"summary":"Get a webhook","description":"One webhook subscription (never its signing secret).","operationId":"get_webhook_webhooks__webhook_id__get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]},"patch":{"tags":["Webhooks"],"summary":"Change a webhook","description":"Changes the URL, events, description, or turns it on/off (`enabled=true` also clears an automatic disable).","operationId":"patch_webhook_webhooks__webhook_id__patch","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"503":{"description":"Feature unavailable right now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook","description":"Unsubscribes the webhook (REST-hook unsubscribe). Its delivery history goes with it.","operationId":"delete_webhook_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/webhooks/{webhook_id}/test":{"post":{"tags":["Webhooks"],"summary":"Send a test ping","description":"Sends a signed `ping` event now (no retries) and answers what the receiver said.","operationId":"test_webhook_webhooks__webhook_id__test_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTest"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"503":{"description":"Feature unavailable right now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}},"/webhooks/{webhook_id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"Recent deliveries","description":"The last 100 events sent to the webhook: type, status, attempts, receiver status, time, error.","operationId":"deliveries_webhooks__webhook_id__deliveries_get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deliveries"}}}},"401":{"description":"Invalid or missing API key (`invalid_api_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"404":{"description":"Not found for this key's user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"422":{"description":"Invalid request (`validation_error`, with details)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"429":{"description":"Rate limited (`rate_limited`, see Retry-After) or another limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}},"500":{"description":"Internal error (`internal_error`; quote the request_id to support)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"insufficient_credits","message":"Not enough credits: 12 left, 50 needed.","status":402,"request_id":"req_5f0c9a1b2c3d4e5f60718293","docs_url":"https://leadwebia.com/docs/api#errors"}}}}}},"security":[{"bearerAuth":[]}]}}},"components":{"schemas":{"Account":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"plan":{"type":"string","title":"Plan","description":"free, pack, former, basic (Starter), pro or agency; starter, professional and enterprise are older plans"},"paid_features":{"type":"boolean","title":"Paid Features","description":"Export, integrations, webhooks and white-label sharing are available"},"credits":{"type":"integer","title":"Credits","description":"Credits left (searches: 1 per business delivered; prospect report: report_cost)"},"pack_credits":{"type":"integer","title":"Pack Credits","description":"Part of the credits from credit packs (never expire)"},"report_cost":{"type":"integer","title":"Report Cost"},"max_running_searches":{"type":"integer","title":"Max Running Searches","description":"Searches that can run at once (0 = no limit)"},"integrations":{"items":{"type":"string"},"type":"array","title":"Integrations","description":"Integrations connected in the app (webhook, instantly, google_sheets)"},"app_url":{"type":"string","title":"App Url"},"plans_url":{"type":"string","title":"Plans Url"}},"type":"object","required":["user_id","plan","paid_features","credits","pack_credits","report_cost","max_running_searches","integrations","app_url","plans_url"],"title":"Account"},"Area":{"properties":{"area_id":{"type":"string","title":"Area Id","description":"Pass it in area_ids when starting a search","examples":["US:TX:4671654"]},"name":{"type":"string","title":"Name","examples":["Austin Area"]},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"type":"string","title":"Country"},"population":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Population"},"points":{"type":"integer","title":"Points","description":"Map points searched in this area"}},"type":"object","required":["area_id","name","country","points"],"title":"Area"},"Areas":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Area"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"Areas"},"BulkDelete":{"properties":{"place_ids":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"Place Ids"}},"type":"object","required":["place_ids"],"title":"BulkDelete","examples":[{"place_ids":["ChIJN1t_tDeuEmsRUsoyG83frY4"]}]},"BulkStatus":{"properties":{"place_ids":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":500},{"type":"null"}],"title":"Place Ids"},"search_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Search Id","description":"Or every lead of this search"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"A CRM status id or title; null or 'none' clears it"}},"type":"object","required":["status"],"title":"BulkStatus","examples":[{"search_id":1234,"status":"Contacted"}]},"Count":{"properties":{"updated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Updated"},"deleted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deleted"}},"type":"object","title":"Count"},"CreateSearch":{"properties":{"niches":{"items":{"type":"string"},"type":"array","maxItems":5,"minItems":1,"title":"Niches","description":"1–5 business types as searched on Google Maps","examples":[["dentist","orthodontist"]]},"area_ids":{"items":{"type":"string"},"type":"array","maxItems":20,"minItems":1,"title":"Area Ids","description":"Area ids from GET /locations"},"max_leads":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Max Leads","description":"Businesses to deliver; reserves this many credits"},"only_without_website":{"type":"boolean","title":"Only Without Website","description":"Only businesses without a website of their own","default":false},"only_with_email":{"type":"boolean","title":"Only With Email","description":"Only businesses with an email (1 credit per business delivered with an email). Not with only_without_website","default":false},"include_pagespeed":{"type":"boolean","title":"Include Pagespeed","description":"Also run Google PageSpeed (slower, no extra credits)","default":false},"language":{"type":"string","enum":["en","es"],"title":"Language","default":"en"}},"type":"object","required":["niches","area_ids","max_leads"],"title":"CreateSearch","examples":[{"area_ids":["US:TX:4671654"],"max_leads":50,"niches":["dentist"],"only_without_website":true}]},"Deliveries":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Delivery"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"Deliveries"},"Delivery":{"properties":{"event_id":{"type":"string","title":"Event Id"},"event_type":{"type":"string","title":"Event Type"},"status":{"type":"string","title":"Status"},"attempts":{"type":"integer","title":"Attempts"},"response_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status"},"ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["event_id","event_type","status","attempts"],"title":"Delivery"},"EmailsIn":{"properties":{"url":{"type":"string","maxLength":2048,"title":"Url","examples":["joesplumbing.com"]}},"type":"object","required":["url"],"title":"EmailsIn","examples":[{"url":"joesplumbing.com"}]},"ErrorBody":{"properties":{"code":{"type":"string","title":"Code","description":"Machine-readable code, e.g. insufficient_credits","examples":["insufficient_credits"]},"message":{"type":"string","title":"Message","description":"Human-readable explanation","examples":["Not enough credits: 12 left, 50 needed."]},"status":{"type":"integer","title":"Status","description":"HTTP status","examples":[402]},"request_id":{"type":"string","title":"Request Id","description":"Also in the X-Request-Id header; quote it to support","examples":["req_3f2a…"]},"docs_url":{"type":"string","title":"Docs Url","examples":["https://leadwebia.com/docs/api#errors"]},"details":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Details","description":"Validation errors (422) or extra detail"}},"type":"object","required":["code","message","status","request_id","docs_url"],"title":"ErrorBody"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"type":"object","required":["error"],"title":"ErrorResponse"},"Export":{"properties":{"count":{"type":"integer","title":"Count"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Download link of the CSV"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["count","url"],"title":"Export"},"ExportIn":{"properties":{"place_ids":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":5000},{"type":"null"}],"title":"Place Ids"},"search_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Search Id"},"website":{"type":"string","enum":["any","without","with","social_or_directory"],"title":"Website","default":"any"}},"type":"object","title":"ExportIn","examples":[{"search_id":1234,"website":"without"}]},"Feed_LeadBrief_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LeadBrief"},"type":"array","title":"Data"},"next_cursor":{"type":"string","title":"Next Cursor","description":"Store it and pass it as the cursor next time: you never miss or repeat an item"},"has_more":{"type":"boolean","title":"Has More","description":"True when more items are ready now: ask again right away with next_cursor"}},"type":"object","required":["data","next_cursor","has_more"],"title":"Feed[LeadBrief]"},"Feed_Search_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Search"},"type":"array","title":"Data"},"next_cursor":{"type":"string","title":"Next Cursor","description":"Store it and pass it as the cursor next time: you never miss or repeat an item"},"has_more":{"type":"boolean","title":"Has More","description":"True when more items are ready now: ask again right away with next_cursor"}},"type":"object","required":["data","next_cursor","has_more"],"title":"Feed[Search]"},"Integrations":{"properties":{"data":{"items":{"type":"string"},"type":"array","title":"Data","description":"Connected kinds: webhook, instantly, google_sheets"}},"type":"object","required":["data"],"title":"Integrations"},"Lead":{"properties":{"place_id":{"type":"string","title":"Place Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"user_ratings_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Ratings Total"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"has_website":{"type":"boolean","title":"Has Website","default":false},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"emails":{"items":{"type":"string"},"type":"array","title":"Emails","default":[]},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"CRM status title"},"cms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cms"},"cms_outdated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cms Outdated"},"niche":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Niche"},"google_maps_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Maps Url"},"search_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Search Id"},"saved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saved At"},"vicinity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vicinity"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"phone_e164":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone E164"},"facebook":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook"},"instagram":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram"},"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin"},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter"},"tiktok":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tiktok"},"youtube":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Youtube"},"performance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Performance"},"accessibility":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accessibility"},"best_practices":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Best Practices"},"seo":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Seo"},"cms_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cms Version"},"ads":{"items":{"type":"string"},"type":"array","title":"Ads","default":[]},"technologies":{"items":{"type":"string"},"type":"array","title":"Technologies","default":[]},"website_is_social_or_directory":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Website Is Social Or Directory"},"is_claimed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Claimed"},"outreach_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outreach Subject"},"outreach_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outreach Message"},"leadwebia_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leadwebia Url"},"pagespeed":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pagespeed","description":"Scores by device (mobile, desktop)"},"core_web_vitals_mobile":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Core Web Vitals Mobile"},"location":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Location"}},"additionalProperties":true,"type":"object","required":["place_id"],"title":"Lead"},"LeadBrief":{"properties":{"place_id":{"type":"string","title":"Place Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"user_ratings_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Ratings Total"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"has_website":{"type":"boolean","title":"Has Website","default":false},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"emails":{"items":{"type":"string"},"type":"array","title":"Emails","default":[]},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"CRM status title"},"cms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cms"},"cms_outdated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cms Outdated"},"niche":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Niche"},"google_maps_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Maps Url"},"search_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Search Id"},"saved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saved At"}},"type":"object","required":["place_id"],"title":"LeadBrief"},"LeadStatus":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position"}},"type":"object","required":["id","title"],"title":"LeadStatus"},"LeadStatusChange":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"A CRM status id or title (GET /lead-statuses); null or 'none' clears it"}},"type":"object","required":["status"],"title":"LeadStatusChange","examples":[{"status":"Contacted"}]},"Lookup":{"properties":{"lookup_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lookup Id"},"candidates":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Candidates"}},"type":"object","required":["candidates"],"title":"Lookup"},"LookupIn":{"properties":{"name":{"type":"string","maxLength":120,"minLength":2,"title":"Name"},"city":{"type":"string","maxLength":80,"minLength":2,"title":"City"},"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country","default":"US"},"keyword":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Keyword"}},"type":"object","required":["name","city"],"title":"LookupIn","examples":[{"city":"Austin","country":"US","keyword":"plumber","name":"Joe's Plumbing"}]},"MoreLeads":{"properties":{"max_leads":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Max Leads","description":"More businesses to deliver; reserves this many credits"},"only_without_website":{"type":"boolean","title":"Only Without Website","default":false},"include_pagespeed":{"type":"boolean","title":"Include Pagespeed","default":false},"language":{"type":"string","enum":["en","es"],"title":"Language","default":"en"}},"type":"object","required":["max_leads"],"title":"MoreLeads","examples":[{"max_leads":50}]},"OutreachIn":{"properties":{"language":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}],"title":"Language","description":"ISO 639-1, e.g. en; default: the search's country"},"sender_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Sender Name"},"agency_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Agency Name"}},"type":"object","title":"OutreachIn","examples":[{"agency_name":"WebCo","language":"en","sender_name":"Ana"}]},"OutreachMessage":{"properties":{"place_id":{"type":"string","title":"Place Id"},"subject":{"type":"string","title":"Subject"},"message":{"type":"string","title":"Message"},"language":{"type":"string","title":"Language"},"issues_mentioned":{"items":{"type":"string"},"type":"array","title":"Issues Mentioned"}},"type":"object","required":["place_id","subject","message","language","issues_mentioned"],"title":"OutreachMessage"},"Page_LeadBrief_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LeadBrief"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total","description":"Items matching the filters"},"offset":{"type":"integer","title":"Offset"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset","description":"Pass it as offset for the next page; null on the last page"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["data","total","offset","next_offset","has_more"],"title":"Page[LeadBrief]"},"Page_Search_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Search"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total","description":"Items matching the filters"},"offset":{"type":"integer","title":"Offset"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset","description":"Pass it as offset for the next page; null on the last page"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["data","total","offset","next_offset","has_more"],"title":"Page[Search]"},"Remaining":{"properties":{"search_id":{"type":"integer","title":"Search Id"}},"additionalProperties":true,"type":"object","required":["search_id"],"title":"Remaining"},"Report":{"properties":{"place_id":{"type":"string","title":"Place Id"},"status":{"type":"string","title":"Status","description":"queued, running, ready or failed"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"},"generated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generated At"},"credits_left":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Left"},"report_cost":{"type":"integer","title":"Report Cost"},"summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Summary","description":"Sections, top issues, competitors (when ready)"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data","description":"The whole snapshot (?full=true)"},"app_url":{"type":"string","title":"App Url"}},"type":"object","required":["place_id","status","report_cost","app_url"],"title":"Report"},"ReportIn":{"properties":{"place_id":{"type":"string","title":"Place Id"},"lookup_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lookup Id","description":"From POST /reports/lookup, for a business that isn't a lead"},"refresh":{"type":"boolean","title":"Refresh","description":"Rebuild a report older than 30 days (charged again)","default":false}},"type":"object","required":["place_id"],"title":"ReportIn","examples":[{"place_id":"ChIJN1t_tDeuEmsRUsoyG83frY4"}]},"Search":{"properties":{"search_id":{"type":"integer","title":"Search Id"},"status":{"type":"string","enum":["queued","running","delivered","completed","failed","cancelled"],"title":"Status","description":"delivered = every business is in, contacts and website checks still being added; completed = finished"},"niches":{"items":{"type":"string"},"type":"array","title":"Niches"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"filters":{"$ref":"#/components/schemas/SearchFilters"},"requested":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requested","description":"Businesses asked for in the latest run"},"delivered":{"type":"integer","title":"Delivered","description":"Businesses delivered by the latest run"},"credits_reserved":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Reserved"},"credits_charged":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Charged"},"progress_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Pct"},"phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase"},"area_used_up":{"type":"boolean","title":"Area Used Up","description":"Every business of the area was found: /more would find nothing new"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At"},"latest_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Run Id"},"app_url":{"type":"string","title":"App Url"}},"type":"object","required":["search_id","status","niches","filters","requested","delivered","area_used_up","app_url"],"title":"Search"},"SearchFilters":{"properties":{"only_without_website":{"type":"boolean","title":"Only Without Website","default":false},"only_with_email":{"type":"boolean","title":"Only With Email","default":false},"include_pagespeed":{"type":"boolean","title":"Include Pagespeed","default":false},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},"type":"object","title":"SearchFilters"},"SearchRun":{"properties":{"run_id":{"type":"string","title":"Run Id"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind","description":"initial or continue"},"status":{"type":"string","title":"Status"},"requested":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requested"},"delivered":{"type":"integer","title":"Delivered"},"credits_reserved":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Reserved"},"credits_charged":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Charged"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At"}},"type":"object","required":["run_id","kind","status","delivered"],"title":"SearchRun"},"SearchRuns":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SearchRun"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"SearchRuns"},"SendIn":{"properties":{"place_ids":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10000},{"type":"null"}],"title":"Place Ids"},"search_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Search Id"},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"},"spreadsheet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spreadsheet Id"},"new_spreadsheet_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"New Spreadsheet Name"}},"type":"object","title":"SendIn","examples":[{"campaign_id":"a1b2c3","search_id":1234}]},"SendResult":{"properties":{"kind":{"type":"string","title":"Kind"},"status":{"type":"string","title":"Status"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"Big sends run in the background: GET /integrations/sends/{task_id}"},"counts":{"additionalProperties":true,"type":"object","title":"Counts","default":{}}},"type":"object","required":["kind","status"],"title":"SendResult"},"ShareIn":{"properties":{"format":{"type":"string","enum":["link","pdf"],"title":"Format","default":"link"},"language":{"type":"string","enum":["en","es"],"title":"Language","default":"en"}},"type":"object","title":"ShareIn","examples":[{"format":"link","language":"en"}]},"Shared":{"properties":{"format":{"type":"string","title":"Format"},"status":{"type":"string","title":"Status"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["format","status"],"title":"Shared"},"Targets":{"properties":{"kind":{"type":"string","title":"Kind"},"targets":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Targets"},"default_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Id"}},"type":"object","required":["kind","targets"],"title":"Targets"},"Webhook":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"enabled":{"type":"boolean","title":"Enabled"},"disabled_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disabled Reason"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","url","events","enabled"],"title":"Webhook"},"WebhookCreated":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"enabled":{"type":"boolean","title":"Enabled"},"disabled_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disabled Reason"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"signing_secret":{"type":"string","title":"Signing Secret","description":"Shown only now: verify X-LeadWebia-Signature with it"}},"type":"object","required":["id","url","events","enabled","signing_secret"],"title":"WebhookCreated"},"WebhookIn":{"properties":{"url":{"type":"string","maxLength":2048,"title":"Url","description":"https URL of a public server","examples":["https://hooks.zapier.com/hooks/catch/1/abc/"]},"events":{"items":{"type":"string","enum":["lead.created","search.completed","search.failed","report.ready","report.failed"]},"type":"array","maxItems":5,"minItems":1,"title":"Events"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"}},"type":"object","required":["url","events"],"title":"WebhookIn","examples":[{"description":"Zapier","events":["lead.created"],"url":"https://hooks.zapier.com/hooks/catch/1/abc/"}]},"WebhookPatch":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string","enum":["lead.created","search.completed","search.failed","report.ready","report.failed"]},"type":"array","maxItems":5,"minItems":1},{"type":"null"}],"title":"Events"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"WebhookPatch","examples":[{"enabled":false}]},"WebhookTest":{"properties":{"ok":{"type":"boolean","title":"Ok"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok"],"title":"WebhookTest"},"Webhooks":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Webhook"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"Webhooks"},"WebsiteCheck":{"properties":{"url":{"type":"string","title":"Url"},"technologies":{"additionalProperties":true,"type":"object","title":"Technologies"},"ssl":{"additionalProperties":true,"type":"object","title":"Ssl"},"pagespeed":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pagespeed"}},"type":"object","required":["url","technologies","ssl"],"title":"WebsiteCheck"},"WebsiteCheckIn":{"properties":{"url":{"type":"string","maxLength":2048,"title":"Url","examples":["joesplumbing.com"]},"include_pagespeed":{"type":"boolean","title":"Include Pagespeed","default":false}},"type":"object","required":["url"],"title":"WebsiteCheckIn","examples":[{"include_pagespeed":false,"url":"joesplumbing.com"}]},"WebsiteContacts":{"properties":{"domain":{"type":"string","title":"Domain"},"emails":{"items":{"type":"string"},"type":"array","title":"Emails"},"phones":{"items":{"type":"string"},"type":"array","title":"Phones"},"socials":{"additionalProperties":{"type":"string"},"type":"object","title":"Socials"},"contact_page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Page"},"pages_checked":{"items":{"type":"string"},"type":"array","title":"Pages Checked"}},"type":"object","required":["domain","emails","phones","socials","pages_checked"],"title":"WebsiteContacts"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"lw_live_…","description":"An API key from the app (the API page, leadwebia.com/api). Also accepted: X-API-Key header."}}},"tags":[{"name":"Account","description":"Plan, credits and CRM statuses."},{"name":"Locations","description":"Search areas for a city."},{"name":"Searches","description":"Google Maps lead searches (spend credits)."},{"name":"Leads","description":"The saved leads: list, poll, detail, CRM status, delete, outreach message."},{"name":"Exports","description":"CSV exports (paid plans)."},{"name":"Integrations","description":"Send leads to the tools connected in the app (paid plans)."},{"name":"Reports","description":"Prospect reports (online-presence audit, 20 credits)."},{"name":"Tools","description":"Website check and email finder for any URL."},{"name":"Webhooks","description":"Event subscriptions (REST hooks) for lead.created, search.* and report.*."}],"security":[{"bearerAuth":[]}]}