50% of every subscription funds junior angling. Learn more →
AAnglingAI

API Reference

The AnglingAI REST API gives you angling-grade chat, photo vision, copywriting and image generation in a single integration. Designed to be dropped into platforms like ClubNest with one bearer token.

Authentication

All requests must include an Authorization header:

Authorization: Bearer ak_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Generate keys from your dashboard. You can have multiple keys per account; revoke one without affecting the others.

Base URL

https://anglingai.co.uk/api/v1

In local dev: http://localhost:3000/api/v1

POST/v1/chat

Streaming angling chat / Q&A

Multi-turn angling assistant. Streams plain UTF-8 text in the response body.

curl
curl -N https://anglingai.co.uk/api/v1/chat \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      { "role": "user", "content": "Best rig for tench in May on a clear lake?" }
    ]
  }'
JavaScript
const res = await fetch("https://anglingai.co.uk/api/v1/chat", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.ANGLINGAI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    messages: [
      { role: "user", content: "Best rig for tench in May on a clear lake?" },
    ],
  }),
});

// Stream the body as plain text
const reader = res.body!.getReader();
const decoder = new TextDecoder();
while (true) {
  const { value, done } = await reader.read();
  if (done) break;
  process.stdout.write(decoder.decode(value));
}
Python
import os, requests
r = requests.post(
    "https://anglingai.co.uk/api/v1/chat",
    headers={"Authorization": f"Bearer {os.environ['ANGLINGAI_KEY']}"},
    json={"messages": [{"role": "user", "content": "Best rig for tench in May?"}]},
    stream=True,
)
for chunk in r.iter_content(chunk_size=None, decode_unicode=True):
    print(chunk, end="", flush=True)

POST/v1/vision

Identify what's in an angling photo

Accepts a remote image URL or a base64 data URL. Streams a structured analysis.

curl
curl -N https://anglingai.co.uk/api/v1/vision \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "imageUrl": "https://example.com/my-fish.jpg",
    "prompt": "Identify the species and estimate weight."
  }'
JavaScript
const res = await fetch("/api/v1/vision", {
  method: "POST",
  headers: { "Authorization": `Bearer ${KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    imageUrl: "https://example.com/my-fish.jpg",
    prompt: "Identify the species and estimate weight."
  }),
});

POST/v1/copywriting

Generate club content

Match reports, newsletters, blog posts, social copy, emails. Streams plain text.

curl
curl -N https://anglingai.co.uk/api/v1/copywriting \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "match-report",
    "tone": "punchy, club-friendly",
    "lengthWords": 220,
    "brief": "Sunday open at Willow Lake. 24 anglers. Winner: Dave Smith, peg 14, 47lb 6oz of skimmers on pole + caster. Conditions: warm, light SW wind."
  }'

POST/v1/image

Generate angling artwork

Returns a base64-encoded PNG ready to embed or save.

curl
curl https://anglingai.co.uk/api/v1/image \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Poster for a junior fishing day on a small UK lake, sunrise, watercolour style",
    "expandPrompt": true
  }'

Response shape:

{
  "image": {
    "base64": "iVBORw0KGgo...",
    "mimeType": "image/png",
    "dataUrl": "data:image/png;base64,iVBORw..."
  },
  "prompt": "...",
  "provider": "openai",
  "model": "gpt-image-2",
  "mocked": false
}

POST/v1/fish-id

Structured fish identification

Returns species, Latin name, size estimates, distinguishing features and a confidence score.

curl
curl https://anglingai.co.uk/api/v1/fish-id \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "imageUrl": "https://example.com/my-fish.jpg" }'

POST/v1/fish-disease

Visible fish health & disease screen

Returns most likely findings, severity, contagious flag, notifiable flag, and recommendations.

curl
curl https://anglingai.co.uk/api/v1/fish-disease \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "imageUrl": "https://example.com/koi.jpg",
    "context": "Pond temperature 22C, ammonia 0.25 ppm"
  }'

POST/v1/risk-assessment

Structured UK-style risk assessment

Hazards table, control measures, residual risk, pre-event checklist and emergency procedure.

curl
curl https://anglingai.co.uk/api/v1/risk-assessment \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "activity": "Sunday open match",
    "venueDescription": "Willow Lake — 3-acre commercial stillwater, pegs 1-30, gravel car park.",
    "participantCount": 24,
    "weatherForecast": "Light SW, 18C, dry"
  }'

POST/v1/session-plan

Coaching session / lesson plan

Structured plans for clubs and coaches: objectives, equipment list, timed segments, differentiation, safety notes and success criteria.

curl
curl https://anglingai.co.uk/api/v1/session-plan \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audience": "Juniors 8-12, total beginners",
    "groupSize": 8,
    "durationMinutes": 120,
    "location": "Willow Lake — pegs 1-8 along south bank",
    "abilityLevel": "complete-beginner",
    "focus": "Safe casting and basic float fishing"
  }'

POST/v1/lake-map

Top-down 2D fishery map image

Builds a flat 2D illustrated lake map with pegs, car park, toilets and the features you tick.

curl
curl https://anglingai.co.uk/api/v1/lake-map \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Willow Lake",
    "shape": "kidney",
    "pegCount": 24,
    "amenities": ["car-park", "toilets", "tackle-shop"],
    "features": ["island", "lily-beds", "reed-beds"]
  }'

POST/v1/weather

Forecast + angling interpretation

Live forecast (Open-Meteo) plus an angling-specific summary with best windows, pressure read and wind read.

curl
curl https://anglingai.co.uk/api/v1/weather \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "location": "Norwich", "targetSpecies": "Carp" }'

POST/v1/tide

Tide times + wave forecast

Coastal locations only. Powered by Open-Meteo Marine.

curl
curl https://anglingai.co.uk/api/v1/tide \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "location": "Brighton" }'

POST/v1/venue-research

Deep research on a fishery

Target species, methods, baits, best spots, seasonal patterns, access info, rules — with sources when TAVILY_API_KEY is set.

curl
curl https://anglingai.co.uk/api/v1/venue-research \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "venueName": "Linear Fisheries",
    "location": "Oxfordshire",
    "targetSpecies": "Carp"
  }'

POST/v1/solunar

Solunar feeding time predictions

Astronomical calculation of major and minor feeding periods based on moon transit, moonrise/set. No AI needed — pure science.

curl
curl https://anglingai.co.uk/api/v1/solunar \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "location": "Bristol", "days": 7 }'

POST/v1/catch-log

Log a catch with conditions

Records species, weight, method, bait, weather, moon phase. Auto-detects personal bests.

curl
curl https://anglingai.co.uk/api/v1/catch-log \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "species": "Tench",
    "weightKg": 3.2,
    "method": "Float",
    "bait": "Sweetcorn",
    "caughtAt": "2026-05-16T06:30:00Z"
  }'

POST/v1/catch-log/analysis

AI pattern analysis across your catches

Identifies correlations between your catches and conditions — best times, baits, pressure, moon phases.

curl
curl https://anglingai.co.uk/api/v1/catch-log/analysis \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "months": 12 }'

GET/v1/catch-log/records

Personal bests vs British records

Your PBs compared against BRFC records, species averages, and specimen thresholds.

curl
curl https://anglingai.co.uk/api/v1/catch-log/records \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

POST/v1/rig-builder

AI-designed rig with exact specifications

Given species, water type, method and conditions — returns a complete rig spec with assembly instructions and optional diagram.

curl
curl https://anglingai.co.uk/api/v1/rig-builder \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "targetSpecies": "Carp",
    "waterType": "commercial-stillwater",
    "method": "method feeder",
    "generateImage": true
  }'

POST/v1/knot-guide

Best knot recommendation with breaking strain data

Factual knot database — returns the strongest knot for your line type and purpose, with step-by-step instructions.

curl
curl https://anglingai.co.uk/api/v1/knot-guide \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "purpose": "hook", "lineType": "braid" }'

POST/v1/byelaw-check

UK fishing regulations checker

Close seasons, size limits, method restrictions, rod licence requirements. Factual EA regulatory data.

curl
curl https://anglingai.co.uk/api/v1/byelaw-check \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "waterType": "river", "date": "2026-04-01" }'

POST/v1/bait-calculator

Bait quantity calculator

How much bait to take based on session length, methods, species, and conditions. Includes cost estimate.

curl
curl https://anglingai.co.uk/api/v1/bait-calculator \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "durationHours": 5,
    "targetSpecies": ["Carp", "F1"],
    "methods": ["method feeder", "pellet waggler"],
    "waterType": "commercial-stillwater",
    "season": "summer"
  }'

POST/v1/spawn-alert

Spawning predictions by water temperature

Which species are likely spawning based on established biological temperature thresholds and photoperiod.

curl
curl https://anglingai.co.uk/api/v1/spawn-alert \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "waterTemperature": 18.5 }'

POST/v1/swim-selector

AI swim/peg selection

Where to fish based on wind, light, temperature, season and venue features. Grounded in established angling principles.

curl
curl https://anglingai.co.uk/api/v1/swim-selector \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "waterType": "commercial-stillwater",
    "targetSpecies": "Carp",
    "windDirection": "SW",
    "season": "summer",
    "venueFeatures": ["island", "lily-beds", "overhanging-trees"]
  }'

POST/v1/peg-analyser

Match fishing peg draw tactical plan

Given a peg number and venue, generates a full tactical plan: primary approach, secondary lines, margin plan, timing, and bait list.

curl
curl https://anglingai.co.uk/api/v1/peg-analyser \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "venueName": "Summerhayes",
    "pegNumber": "14",
    "pegDescription": "End peg, island to the left at 13m",
    "matchDuration": 5
  }'

POST/v1/water-temp

Estimated water temperature + fish activity

Thermal lag model estimates water temp from air data. Returns fish activity thresholds for each species.

curl
curl https://anglingai.co.uk/api/v1/water-temp \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "location": "Norwich", "waterType": "stillwater" }'

GET/v1/tackle

Tackle inventory with maintenance alerts

Track your gear, log usage hours, get alerts when line needs replacing or hooks need checking.

curl
curl https://anglingai.co.uk/api/v1/tackle \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

POST/v1/social/accounts

Connect a social account

Add a Facebook/Instagram/X/LinkedIn account (or 'mock' for testing). Real OAuth wiring in src/lib/social/publisher.ts.

curl
curl https://anglingai.co.uk/api/v1/social/accounts \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "twitter",
    "handle": "@anglingclub",
    "accessToken": "..."
  }'

POST/v1/social/posts

Create / schedule / publish a post

Set scheduledFor for later, publishNow:true to publish immediately, or omit both to save as draft.

curl (schedule)
curl https://anglingai.co.uk/api/v1/social/posts \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "ckxyz...",
    "body": "Sunday open match results — Dave Smith with 47lb 6oz!",
    "scheduledFor": "2026-06-01T09:00:00Z"
  }'

POST/v1/social/run-scheduler

Process all due scheduled posts

Call this on a cron (Vercel Cron, GitHub Actions, etc.) to publish posts whose scheduledFor has passed.

curl
curl -X POST https://anglingai.co.uk/api/v1/social/run-scheduler \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

DELETE/v1/social/accounts/:id

Remove a connected social account

Permanently disconnects a social account. Posts already published are not affected.

curl
curl -X DELETE https://anglingai.co.uk/api/v1/social/accounts/ckxyz123 \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

PATCH/v1/social/posts/:id

Update or publish a post

Edit body, reschedule, or set publishNow:true to push it live immediately.

curl
curl -X PATCH https://anglingai.co.uk/api/v1/social/posts/post_abc \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "Updated copy for the match report post.",
    "publishNow": true
  }'

DELETE/v1/social/posts/:id

Delete a social post

Removes a draft or scheduled post. Already-published posts cannot be un-published via this endpoint.

curl
curl -X DELETE https://anglingai.co.uk/api/v1/social/posts/post_abc \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

GET/v1/catch-log/:id

Get a single catch entry

Returns the full catch record including linked venue data.

curl
curl https://anglingai.co.uk/api/v1/catch-log/clxyz123 \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

PATCH/v1/catch-log/:id

Update a catch entry

Partial update — send only the fields you want to change. Supports species, weight, method, bait, rig, peg, swim, notes, and photo.

curl
curl -X PATCH https://anglingai.co.uk/api/v1/catch-log/clxyz123 \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "weightKg": 3.5, "notes": "Caught on the drop, 3ft deep." }'

DELETE/v1/catch-log/:id

Delete a catch entry

Permanently removes a catch log entry.

curl
curl -X DELETE https://anglingai.co.uk/api/v1/catch-log/clxyz123 \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

GET/v1/tackle/:id

Get a single tackle item

Returns the full tackle item record including usage hours and condition.

curl
curl https://anglingai.co.uk/api/v1/tackle/item_abc \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

PATCH/v1/tackle/:id

Update a tackle item or log usage

Update name, condition, notes, or add usage hours from a session. Set addHours to increment the usage counter.

curl
curl -X PATCH https://anglingai.co.uk/api/v1/tackle/item_abc \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "addHours": 5, "condition": "good" }'

DELETE/v1/tackle/:id

Delete a tackle item

Permanently removes a tackle item from your inventory.

curl
curl -X DELETE https://anglingai.co.uk/api/v1/tackle/item_abc \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

POST/v1/rig-builder/image

Generate a rig diagram image

Creates a technical illustration of rig components or the assembled setup. Specify type 'components' for a parts layout or 'setup' for the full rig as it would look ready to fish.

curl
curl https://anglingai.co.uk/api/v1/rig-builder/image \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "setup",
    "rigName": "Simple pole float rig",
    "method": "pole float",
    "components": [
      { "component": "Float", "specification": "0.3g slim-bodied pole float" },
      { "component": "Line", "specification": "0.12mm mainline to 0.10mm hooklength" },
      { "component": "Shot", "specification": "Strung No.10 shot" },
      { "component": "Hook", "specification": "Size 18 barbless" }
    ]
  }'

POST/v1/lake-map/from-location

Generate a lake map from GPS coordinates

Queries OpenStreetMap for the real water body outline at the given lat/lng, then generates an illustrated map using the actual shape. Ideal for fisheries that want accurate maps.

curl
curl https://anglingai.co.uk/api/v1/lake-map/from-location \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lat": 51.3456,
    "lng": -2.7890,
    "name": "Willow Lake",
    "pegCount": 24,
    "amenities": ["car-park", "toilets"],
    "features": ["island", "reed-beds"]
  }'

POST/v1/product-description

Generate SEO product copy

Product descriptions, comparison guides, buying guides, blog posts, social copy, and email campaigns for tackle shops. Streams plain text or returns structured JSON.

curl
curl -N https://anglingai.co.uk/api/v1/product-description \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "product-description",
    "product": {
      "name": "Daiwa N'Zon Feeder Rod 12ft",
      "brand": "Daiwa",
      "category": "rod",
      "price": 89.99,
      "features": ["3-piece", "carbon blank", "2 quiver tips included"]
    },
    "brief": "Write for intermediate anglers upgrading from a starter rod.",
    "tone": "enthusiastic",
    "lengthWords": 200,
    "seoKeywords": ["feeder rod", "method feeder", "Daiwa N Zon"]
  }'

POST/v1/product-recommend

AI product recommendations

Given a customer query, returns ranked product recommendations with reasoning. Optionally pass your own product catalogue for the AI to recommend from.

curl
curl https://anglingai.co.uk/api/v1/product-recommend \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "I want to start pole fishing on commercials, budget around £300",
    "targetSpecies": ["Carp", "F1"],
    "venueType": "stillwater",
    "experienceLevel": "beginner",
    "category": "rod",
    "maxResults": 5
  }'

POST/v1/search

AI-powered product search

AI-powered intelligent search that understands fishing intent. Authenticates by API key or verified domain (Origin header). Returns ranked results from your synced product catalogue.

curl
curl https://anglingai.co.uk/api/v1/search \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "pole for F1s under £500",
    "limit": 8,
    "store_url": "https://myshop.co.uk"
  }'

GET/v1/trends

Angling trend analytics

Aggregated data showing what anglers are asking about — top species, methods, baits, and topics. Useful for tackle shops to understand demand and stock accordingly.

curl
curl "https://anglingai.co.uk/api/v1/trends?days=30" \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

GET/v1/conversations

List chat conversations

Returns your recent conversations, optionally filtered by location. Used by the chat UI to show history.

curl
curl "https://anglingai.co.uk/api/v1/conversations?locationId=loc_abc" \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

POST/v1/conversations

Create a new conversation

Starts a new chat thread, optionally linked to a fishing location.

curl
curl https://anglingai.co.uk/api/v1/conversations \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "locationId": "loc_abc" }'

GET/v1/locations

List fishing locations

Returns your saved fishing locations (venues). Pro plan and above.

curl
curl https://anglingai.co.uk/api/v1/locations \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

POST/v1/locations

Create a fishing location

Save a new fishing venue with name, water type, postcode, and colour tag. Pro plan and above.

curl
curl https://anglingai.co.uk/api/v1/locations \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Willow Lake",
    "waterType": "stillwater",
    "postcode": "BA11 2PH",
    "colour": "#10b981"
  }'

GET/v1/domains

List verified domains

Returns your registered domains for widget/API access without API keys. Club plan and above.

curl
curl https://anglingai.co.uk/api/v1/domains \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

POST/v1/domains

Register a domain

Add a domain for widget access. Returns a DNS TXT verification token. Once verified, the widget can authenticate by Origin header instead of API key.

curl
curl https://anglingai.co.uk/api/v1/domains \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "domain": "myfishery.co.uk" }'

GET/v1/fishery-overrides

List fishery knowledge overrides

Returns your custom fishery knowledge entries that the AI uses when answering questions about your venue. Fishery plan and above.

curl
curl https://anglingai.co.uk/api/v1/fishery-overrides \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

POST/v1/fishery-overrides

Add fishery knowledge

Teach the AI about your fishery — lakes, species, rules, facilities, methods, pricing, directions. The AI will use this when answering visitor questions.

curl
curl https://anglingai.co.uk/api/v1/fishery-overrides \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "lakes",
    "subject": "Willow Lake",
    "content": "3-acre commercial stillwater, 30 pegs, stocked with carp to 28lb, F1s, tench, bream. Average depth 5ft, island at 13m.",
    "lakeId": "clxyz123"
  }'

Fishery Lakes & Pegs

Manage individual lakes/waters within your fishery, including peg-by-peg detail. The AI uses this structured data to answer visitor questions about specific lakes and pegs. Fishery plan and above.

GET/v1/fishery-lakes

List all lakes

Returns all lakes/waters for your fishery, including pegs and override counts.

curl
curl https://anglingai.co.uk/api/v1/fishery-lakes \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

POST/v1/fishery-lakes

Add a lake

Create a new lake/water with species, methods, rules, depth, postcode, and more. The AI will reference this when visitors ask about your fishery.

curl
curl https://anglingai.co.uk/api/v1/fishery-lakes \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Specimen Lake",
    "waterType": "lake",
    "postcode": "TA9 4HA",
    "acreage": 3.5,
    "maxDepth": 12,
    "avgDepth": 5,
    "pegsCount": 24,
    "species": ["Carp to 30lb", "Tench to 8lb", "Bream to 10lb"],
    "methods": ["Pole", "Method feeder", "Waggler", "Surface"],
    "rules": ["Barbless hooks only", "No keepnets", "Landing net required"],
    "features": ["Island", "Lily pads", "Reed beds", "Aerator"],
    "dayTicket": "£10 per rod, £15 for 2 rods",
    "matchBooking": true
  }'

PUT/v1/fishery-lakes/:id

Update a lake

Partial update — send only the fields you want to change.

curl
curl -X PUT https://anglingai.co.uk/api/v1/fishery-lakes/clxyz123 \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "dayTicket": "£12 per rod (2026 prices)",
    "species": ["Carp to 32lb", "Tench to 9lb", "Bream to 10lb", "Perch to 4lb"]
  }'

DELETE/v1/fishery-lakes/:id

Delete a lake

Permanently removes a lake and all its pegs.

curl
curl -X DELETE https://anglingai.co.uk/api/v1/fishery-lakes/clxyz123 \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

GET/v1/fishery-lakes/:id/pegs

List pegs for a lake

Returns all pegs/swims for a specific lake, ordered by sort position.

curl
curl https://anglingai.co.uk/api/v1/fishery-lakes/clxyz123/pegs \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

POST/v1/fishery-lakes/:id/pegs

Add a peg to a lake

Document an individual peg/swim with depth, features, best methods, best baits, and species. The AI uses this for peg-specific advice.

curl
curl https://anglingai.co.uk/api/v1/fishery-lakes/clxyz123/pegs \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "14",
    "name": "Island Peg",
    "depth": 6.5,
    "features": ["Near island", "Overhanging tree", "Gravel bottom"],
    "bestMethods": ["Pole at 13m to island", "Method feeder", "Waggler"],
    "bestBaits": ["Pellet", "Corn", "Maggot"],
    "species": ["Carp", "F1", "Tench"],
    "notes": "Produces well in matches. Shade in afternoon."
  }'

PUT/v1/fishery-lakes/:id/pegs/:pegId

Update a peg

Partial update — send only the fields you want to change.

curl
curl -X PUT https://anglingai.co.uk/api/v1/fishery-lakes/clxyz123/pegs/peg_abc \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "depth": 7,
    "notes": "Recently cleared snags. Fishing better since May 2026."
  }'

DELETE/v1/fishery-lakes/:id/pegs/:pegId

Delete a peg

Permanently removes a peg from a lake.

curl
curl -X DELETE https://anglingai.co.uk/api/v1/fishery-lakes/clxyz123/pegs/peg_abc \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

GET/v1/widget/config

Get widget configuration

Returns the widget feature flags, branding defaults, and quota info for the authenticated API key. Club and Shops plans only.

curl
curl https://anglingai.co.uk/api/v1/widget/config \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

GET/v1/widget-settings

Get widget appearance settings

Returns your widget customisation — colours, fonts, layout, messaging, and custom CSS.

curl
curl https://anglingai.co.uk/api/v1/widget-settings \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

PUT/v1/widget-settings

Update widget appearance

Customise your widget — primary/secondary colours, fonts, border radius, position, chat title/subtitle, welcome message, and more.

curl
curl -X PUT https://anglingai.co.uk/api/v1/widget-settings \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "primaryColor": "#10b981",
    "chatTitle": "Ask Our AI",
    "chatWelcome": "Hi! Ask me anything about our fishery.",
    "position": "right"
  }'

POST/v1/widget-events/track

Track widget events

Record user interactions from the embedded widget — chat sessions, product clicks, add-to-cart, purchases, searches. Authenticated by verified domain (Origin header).

curl
curl https://anglingai.co.uk/api/v1/widget-events/track \
  -H "Content-Type: application/json" \
  -H "Origin: https://myshop.co.uk" \
  -d '{
    "event_type": "product_click",
    "product_id": "123",
    "product_name": "Daiwa N Zon Feeder Rod",
    "session_id": "sess_abc"
  }'

GET/v1/widget-events/stats

Widget analytics dashboard

Aggregated stats for your widget — chat sessions, searches, product clicks, add-to-carts, purchases, revenue, conversion rates, top queries, and top products.

curl
curl "https://anglingai.co.uk/api/v1/widget-events/stats?days=30" \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

WooCommerce Integration

Full e-commerce integration for tackle shops running WooCommerce. Sync your product catalogue, get AI-powered recommendations, and add an intelligent chat widget to your store. Available on the Shops & Manufacturers plan.

GET/v1/woocommerce/verify

Verify API key for WooCommerce

Quick check that an API key is valid and returns the associated plan. Used by the WooCommerce plugin during setup.

curl
curl https://anglingai.co.uk/api/v1/woocommerce/verify \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

POST/v1/woocommerce/sync

Sync product catalogue

Push products from your WooCommerce store to AnglingAI. Send up to 100 products per request. The AI uses this catalogue for recommendations and search.

curl
curl https://anglingai.co.uk/api/v1/woocommerce/sync \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "store_url": "https://myshop.co.uk",
    "store_name": "My Tackle Shop",
    "products": [
      {
        "id": 123,
        "name": "Daiwa N Zon Feeder Rod 12ft",
        "price": "89.99",
        "in_stock": true,
        "categories": ["Rods", "Feeder Rods"],
        "brand": "Daiwa"
      }
    ]
  }'

GET/v1/woocommerce/status

Get store sync status

Check how many products are synced, when the last sync happened, and how many are in stock.

curl
curl "https://anglingai.co.uk/api/v1/woocommerce/status?store_url=https://myshop.co.uk" \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

POST/v1/woocommerce/chat

Product-aware shop chat

Chat endpoint that knows your shop's actual stock. The AI only recommends products you sell and includes product URLs for click-through.

curl
curl https://anglingai.co.uk/api/v1/woocommerce/chat \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "I need a feeder rod for commercials, budget around £100",
    "store_url": "https://myshop.co.uk",
    "page_context": {
      "page_type": "category",
      "category_name": "Feeder Rods"
    }
  }'

POST/v1/woocommerce/recommendations

Product recommendations from your catalogue

AI selects the best products to recommend based on what the customer is currently viewing. Returns product IDs, reasons, and relevance scores.

curl
curl https://anglingai.co.uk/api/v1/woocommerce/recommendations \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": 123,
    "context": "similar",
    "store_url": "https://myshop.co.uk",
    "limit": 4
  }'

DELETE/v1/woocommerce/products/:id

Remove a product from the index

Delete a single product from your synced catalogue. Useful when a product is discontinued.

curl
curl -X DELETE "https://anglingai.co.uk/api/v1/woocommerce/products/123?store_url=https://myshop.co.uk" \
  -H "Authorization: Bearer $ANGLINGAI_KEY"

POST/v1/woocommerce/recommendations/cart

Cart-based recommendations

'You might also need' — AI analyses the customer's basket and suggests complementary products from your stock.

curl
curl https://anglingai.co.uk/api/v1/woocommerce/recommendations/cart \
  -H "Authorization: Bearer $ANGLINGAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_ids": [123, 456, 789],
    "store_url": "https://myshop.co.uk",
    "limit": 4
  }'

Errors

Errors are returned as JSON with a sensible HTTP status:

  • 400 — bad request body
  • 401 — missing or invalid API key
  • 402 — monthly quota exhausted (upgrade plan)
  • 429 — rate limit exceeded
  • 500 — server error

Useful response headers

  • X-AnglingAI-Provider — which upstream provider served the request (openai / anthropic / google / mock)
  • X-AnglingAI-Model — the upstream model id