# SharksAPI.AI — AI Agent Onboarding Guide > Base URL: https://sharksapi.ai > Protocol: A2A (Agent-to-Agent) + MCP (Model Context Protocol) > Auth: OAuth2 Client Credentials > Discovery: https://sharksapi.ai/.well-known/agent.json > What it is: an AI marketing agency platform. You (the agent) become the owner's AI marketing team, a marketing director plus SEO, ads, content, social and analytics specialists, working in the owner's own accounts. The owner sets each channel to Manual, Approve or Autopilot; SharksAPI enforces those levels and the ad-spend ceilings on every tool call. ## Agent Identity Rules (read this first) **Registration is idempotent by `owner_email`.** The same owner e-mail always finds the existing agent, whatever `agent_type` you send: the answer is `existing: true` without the agent's ids or secret (anyone can send an e-mail address), and the owner is e-mailed a link to recover it. NEVER invent a new `agent_name` each session — save the credentials from your first registration and reuse them. **Valid `agent_type` values:** `claude_cowork`, `marketingbot`, `managementbot`, `custom`. Any other value is rejected with HTTP 422. **Recommended agent_name format:** `claude-code-{slug(owner_email)}-{agent_type}` — e.g. `claude-code-user-at-example-com-marketingbot`. **Before registering:** If you have saved `client_id` and `client_secret` from a previous session, skip registration and POST directly to `/oauth/token`. The register endpoint does NOT return `agent_id`, `client_id` or `client_secret` on subsequent lookups — they are only shown at initial creation. **If you lose credentials:** `POST /api/v1/agents/{id}/login` with `{"email": ""}` e-mails the owner a sign-in link to the agent dashboard (valid 15 minutes). There the owner presses **Generate a new client secret** and gives you the `client_id` and the new `client_secret` shown once on that page. Your `agent_id`, `client_id`, project and connections all remain intact; the old secret and tokens stop working. Registering again with the same owner e-mail also e-mails the owner that sign-in link (at most one per 15 minutes). `POST /api/v1/agents/{id}/rotate-secret` needs the current secret, so it rotates a secret you still have. **Owner already has a SharksAPI account** (for example bought credits on sharksapi.ai/pricing before you registered): registration answers HTTP 202 with `status: "pending"`, `project_id: null`, `client_id: null`, `client_secret: null` and a `pairing_code`. We e-mail the owner a confirmation link. Show the owner your pairing code: they press Confirm only if the e-mail shows the same code, and the confirmation page then shows THEM your `client_id` and `client_secret`, once. Ask the owner to give you both, save them, and continue with `POST /oauth/token`. The registering request never receives credentials, and nothing issued before the confirmation works after it. `GET /api/v1/agents/{agent_id}/status` only says `pending` or `approved`. Do not register again while you wait: a new registration with the same owner e-mail replaces the waiting one (only the newest can be confirmed). For such an e-mail only an agent the owner confirmed (or one already working in that project) counts as an existing agent. `new_project: true` never joins the paid project: it always creates a new, separate project. **Separate client / separate project (same owner email):** one owner can run MULTIPLE agents — one per client project (e.g. one for client-a.example, another for client-b.example). Register the additional agent with `new_project: true` and a DISTINCT `agent_name` that includes the client slug: ```json POST /api/v1/agents/register {"agent_name": "claude-code-owner-at-example-com-custom-client-b", "agent_type": "custom", "owner_email": "owner@example.com", "new_project": true} ``` Without `new_project: true`, registration always returns your FIRST agent (idempotency guard). Re-running the same new-project call with the same `agent_name` is idempotent — you get the same second agent back. Each agent gets its own project, connections and dashboards, so client data stays isolated. --- ## Endpoint Rules (do not guess) Use the exact endpoints below. Do not try `/api/v1/store-credentials`, `/api/v1/credentials`, `/api/v1/connections/store`, or other guessed variants. | Goal | Use this | |---|---| | Register agent | `POST https://sharksapi.ai/api/v1/agents/register` | | Get Bearer token (once, then reuse it until it expires) | `POST https://sharksapi.ai/oauth/token` | | Start OAuth service connection | `POST https://sharksapi.ai/api/v1/agents/{agent_id}/connections/init` | | Start several OAuth connections | `POST https://sharksapi.ai/api/v1/agents/{agent_id}/connections/init-bulk` | | Store API-key credentials | `POST https://sharksapi.ai/api/v1/agents/{agent_id}/connections/store-credentials` | | Check connection status | `GET https://sharksapi.ai/api/v1/agents/{agent_id}/connections/{service}/status` | | Diagnose all connections | `GET https://sharksapi.ai/api/v1/agents/{agent_id}/connections/doctor?live=0|1` | | Diagnose one connection | `GET https://sharksapi.ai/api/v1/agents/{agent_id}/connections/{service}/doctor?live=0|1` | | Safely retry one connection | `POST https://sharksapi.ai/api/v1/agents/{agent_id}/connections/{service}/doctor/repair` | | Configure connection metadata | `PUT https://sharksapi.ai/api/v1/agents/{agent_id}/connections/{service}/configure` | | A2A v1.0 discovery (lists your project's tools) | `POST https://sharksapi.ai/a2a` with `method: "message/send"` | | Direct tool call | `POST https://sharksapi.ai/api/v1/a2a` with `method: "tasks/send"` and `params.tool` | | Normal ChatGPT MCP connector | `POST https://sharksapi.ai/mcp/chatgpt` (`search`/`fetch`) | | Full MCP clients | `POST https://sharksapi.ai/mcp/{managementbot|marketingbot}` | Connection setup is REST, or over MCP/A2A the tools `start_connection` (OAuth link for the owner), `connect_service` (API keys) and `configure_connection` (the setting a connection needs). After a connection is `connected`, use A2A or MCP to call tools. --- ## Quick Start (5 steps) After Step 2, call the tool `get_onboarding_status` (MCP or A2A) and follow it in order. It is the onboarding checklist for your person: the interview questions (save the answers with `set_project_profile`), what to connect, their own sign-in, the first result, the plan they approve and the recurring work, with the next step named every time. **A business that runs its marketing with you and no agency (self-serve):** make its own dashboard the project's first one: `create_dashboard` with `role: "manager"`, `self_serve: true` and `widgets: []`. SharksAPI e-mails the owner a one-time sign-in link to it, in English. Send the owner only that link, never the dashboard password: they sign in from the e-mail, finish the setup on Today (business profile, brand, Connect Google, the plan), connect more tools in Settings and approve your plan in Decisions. Ask which currency they work in and save it with `set_project_profile` `currency` (EUR, USD or GBP), so money on their dashboard shows in it. **Recurring work (the step after the plan is approved):** SharksAPI runs no agents for the client — you do the work. When `get_onboarding_status` returns `do_now`, act on it before anything else: create one scheduled task per job in `recurring_jobs` in the person's own AI app (ChatGPT Tasks, a Claude scheduled task, a Gemini scheduled action), each with the prompt and time given — a night job per channel (SEO, Google Ads, content …). If your app can create scheduled tasks itself, create them and read each back to your person; otherwise give them each job's time and prompt to paste. Once they exist, confirm them with `set_project_profile` (`scheduled_jobs`: the key of every job that runs, from `recurring_jobs[].key`): the step is then done and nobody is asked to create them twice. Save which app you run in with `set_project_profile` (`ai_client`). The marketing director runs on SharksAPI itself for self-serve clients: it answers the owner's questions within seconds, tidies the mornings, writes the Monday text and watches the numbers; ask it with `ask_director` (over A2A: `tasks/send` with `tool: ask_director`) when you need the plan's priorities or the owner's facts. ### Step 1: Register POST https://sharksapi.ai/api/v1/agents/register Content-Type: application/json { "agent_name": "your-unique-agent-name", "agent_type": "marketingbot", "owner_email": "owner@example.com", "description": "Brief description of your agent" } agent_type options: claude_cowork, marketingbot, managementbot, custom Response includes client_id and client_secret. SAVE client_secret — it cannot be retrieved again (it is hashed on our side). It also names where to call tools once you have a token: `mcp_url` (the MCP endpoint of your agent_type), `a2a_endpoint`, and an `example_request` for your first call. Registration is idempotent by `owner_email`. If an agent with the same owner e-mail already exists (any type), the endpoint answers `existing: true` without the agent's `agent_id`, `client_id` or `client_secret`: use the credentials you saved. If the owner e-mail already has a SharksAPI account, the answer is HTTP 202 `pending` without credentials: the owner confirms you from e-mail (same `pairing_code`) and gives you the `client_id` and `client_secret` shown on the confirmation page (see Agent Identity Rules). ### Step 2: Get Bearer Token POST https://sharksapi.ai/oauth/token Content-Type: application/json { "grant_type": "client_credentials", "client_id": "agent_xxx...", "client_secret": "secret_xxx..." } Response: {"access_token": "...", "token_type": "Bearer", "expires_in": 31536000} Use this token in all subsequent requests: Authorization: Bearer {access_token} Get the token once and reuse it for every call until it expires. Save `access_token` with its expiry (now + `expires_in`, one year). Do NOT call /oauth/token before each request: every call mints a new one-year token, and the endpoint is rate-limited per client. Request a new token only when the saved one has expired or a call returns 401. A config file handed to you with an `access_token` works the same way: use that token, even if its expiry field is empty. ### Step 3: Connect Services Most services require OAuth authorization by the human owner. Use bulk init to request multiple services at once: POST https://sharksapi.ai/api/v1/agents/{agent_id}/connections/init-bulk Authorization: Bearer {token} Content-Type: application/json { "services": ["ga4", "gsc", "facebook", "linkedin"], "callback_email": "owner@example.com" } Response includes an authorization_url. Present this URL to the human user — they must open it in a browser to authorize each service via OAuth. After authorization, the human selects which specific account/property to use (e.g., which GA4 property, which Facebook Page). For single service: POST https://sharksapi.ai/api/v1/agents/{agent_id}/connections/init Body: {"service": "ga4", "callback_email": "owner@example.com"} Over MCP (any client, also a person's own connector): call the tool `start_connection` with `{"service": "ga4"}`. It returns the same `authorization_url` (and e-mails it to the owner); a request still waiting returns the same link. For API-key services (no OAuth needed): POST https://sharksapi.ai/api/v1/agents/{agent_id}/connections/store-credentials Authorization: Bearer {token} Content-Type: application/json Body: {"service": "bing", "credentials": {"api_key": "xxx"}, "metadata": {"site_url": "https://example.com/"}} Note: if a required `metadata` field is missing (for example Bing's `site_url`), the API returns `needs_configuration`; finish with `PUT /api/v1/agents/{agent_id}/connections/{service}/configure` and the missing field. ### Step 4: Check Connection Status GET https://sharksapi.ai/api/v1/agents/{agent_id}/connections Authorization: Bearer {token} Or per service: GET https://sharksapi.ai/api/v1/agents/{agent_id}/connections/{service}/status If a connection has needs_configuration: true, you must select which account to use: GET https://sharksapi.ai/api/v1/agents/{agent_id}/connections/{service}/options (Returns list of available properties/accounts/pages) PUT https://sharksapi.ai/api/v1/agents/{agent_id}/connections/{service}/configure Authorization: Bearer {token} Content-Type: application/json Over MCP use `configure_connection` with `{"service": "...", "config": {...}}`: the same fields and checks. Only the service's own setting fields are taken; the connection becomes `connected` once every required setting is there, otherwise the answer lists `required_metadata`. Body depends on service: - ga4: {"property_id": "123456789"} - gsc: {"site_url": "https://example.com"} - google_business: {"location_id": "locations/1234567890"} - bing: {"site_url": "https://example.com/"} // first store credentials with {"api_key": "..."} - facebook: {"page_id": "123456"} - instagram: {"ig_business_account_id": "123456"} - linkedin: {"organization_urn": "urn:li:organization:123456"} - meta_ads: {"ad_account_id": "act_123456"} - google_ads: {"customer_id": "123456"} Note: If the human owner authorized via the web UI, they may have already selected the account during OAuth. Check the connection status first. ### Connection Doctor Connection Doctor classifies connection health without returning credentials or tokens. Static checks (`live=0`, the default) identify missing credentials, missing metadata, expired OAuth authorization, and stored error states. Live checks (`live=1`) use bounded, read-only provider requests where supported. `POST /api/v1/agents/{agent_id}/connections/{service}/doctor/repair` is retry-only: it never deletes or rotates credentials. A verified healthy response may mark the connection `connected`; definitive authentication or configuration failure may mark it `error`; temporary provider/network failures and unsupported probes leave the stored status unchanged. If `reconnect_required` is true, follow the returned reconnect instruction and use the normal `/connections/init` human OAuth flow. Agents using MCP/A2A can call `diagnose_connections` and `repair_connection` with the same safety semantics. ### Run Inspector — failed and stalled tool runs Use Run Inspector to explain why project tool runs failed without reading raw task arguments, callback URLs, IP metadata, credentials, or full provider responses. It covers A2A tasks and failed MCP `tools/call` (the MCP error's `data.task_id` is the run to inspect): - `GET /api/v1/agents/{agent_id}/runs/inspector?days=7&limit=50` - `GET /api/v1/agents/{agent_id}/runs/{task_id}/inspector` - MCP/A2A tool: `inspect_runs` (optional `task_id`, otherwise `days` + `limit`) It classifies missing/invalid input, missing connections, connections that still need a setting (`needs_configuration`), authentication/permission failures, rate limits, timeouts, temporary and other provider errors, missing resources, SharksAPI-side setup and internal errors, unknown failures, and runs stalled for more than 15 minutes. Results contain sanitized error text, likely root cause, and a recommended next action. Run Inspector is read-only and deliberately does not replay tasks because the original tool may have had side effects. ### First Value — activation milestones Use `GET /api/v1/agents/{agent_id}/first-value` or the MCP/A2A tool `first_value_status` to see whether the project has reached its first useful outcome. The status is derived from real events rather than a manual checklist: 1. an approved agent is attached; 2. at least one data source is connected; 3. a non-setup tool run completes successfully; 4. a public project dashboard exists. The response includes sequential progress, event timestamps, full-activation time-to-first-value, the next best action, and a ready-to-use prompt. A useful run must occur after connection activation and must return a non-empty result. Only a currently available, non-expired, password-protected dashboard completes activation. It never returns connection credentials, raw task inputs, or task results. Setup/control calls such as First Value status itself, integration/status lookups, diagnostics, memory management, team/plan status, and dashboard CRUD do not count as the first useful run. ### Step 5: Fetch Documentation & Use Tools GET https://sharksapi.ai/api/v1/agents/{agent_id}/documentation Authorization: Bearer {token} Returns all available tools grouped by category, with full parameter schemas, usage guide, and connection status. This is your primary reference for what you can do. Client dashboards (AI osakond / AI tiim / SEO): the platform pulls GA4, Search Console, Google Ads, Meta Ads, Facebook, Instagram, TikTok, LinkedIn and PageSpeed itself (re-warmed hourly, fully re-read every night). What is YOURS to write (sections, cadence, tools) and where every block's data comes from: https://sharksapi.ai/docs/ai-osakond-andmed.md — also returned by get_seo_dashboard as data_map. ## Credential Recovery If you've lost your `client_secret`: 1. `POST /api/v1/agents/{agent_id}/login` with `{"email": ""}` Triggers a magic-link email to the owner. The owner clicks the link (valid 15 minutes, works once) and lands on the agent dashboard. Registering again with the same owner e-mail sends the same link, without needing the `agent_id`. 2. On the dashboard the owner presses **Generate a new client secret**. The page shows the `client_id` and the new `client_secret` once. 3. The owner pastes the new `client_secret` back into `~/.sharksapi/credentials.json` (or wherever credentials are stored), or gives both values to you. 4. Your `agent_id`, `client_id`, project, all existing connections, and history stay intact — only the secret changes. The old secret, every earlier access token and every OAuth refresh token of the agent stop working: get a new token from `/oauth/token` (an app connected to the agent through OAuth connects again). `POST /api/v1/agents/{agent_id}/rotate-secret` needs `client_id` and the current `client_secret`: it rotates a secret you still have, it does not recover a lost one. Do NOT re-register with a different `agent_name` — registration is idempotent by `owner_email` and you only get `existing: true` back (no ids, no new secret). --- ## Calling Tools ### Option A: A2A Protocol (recommended) **A2A v1.0 discovery** (spec-compliant): `message/send` answers with the tools your project can use; it does not run them. Run a tool with `tasks/send` below. `tasks/get` reads a task by id. POST https://sharksapi.ai/a2a Authorization: Bearer {token} Content-Type: application/json { "jsonrpc": "2.0", "method": "message/send", "id": "req-1", "params": { "message": { "role": "user", "parts": [{"type": "text", "text": "Which tools can I use?"}] } } } **Run a tool** (`tasks/send`: every tool runs this way): POST https://sharksapi.ai/api/v1/a2a Authorization: Bearer {token} Content-Type: application/json { "jsonrpc": "2.0", "method": "tasks/send", "id": "req-1", "params": { "tool": "get_ga4", "arguments": { "metrics": ["sessions", "totalUsers"], "dimensions": ["date"], "start_date": "2025-01-01", "end_date": "2025-01-31" } } } You can also route by skill instead of specific tool: "params": {"skill": "marketing", "message": {"query": "Get last 30 days traffic overview"}} ### Send an email (A2A) ``` POST https://sharksapi.ai/api/v1/a2a Authorization: Bearer {token} Content-Type: application/json { "jsonrpc": "2.0", "method": "tasks/send", "id": "req-email-1", "params": { "tool": "send_email", "arguments": { "to": "recipient@example.com", "subject": "Hello from SharksAPI", "body": "Plain text version of the message", "html": "

HTML version (optional)

" } } } ``` Use `/a2a` for message-style A2A tasks. Use `/api/v1/a2a` only when you intentionally call a specific tool with `params.tool` and `params.arguments`. You can also route by skill instead of a specific tool: ``` "params": {"skill": "email", "message": {"query": "Send a test email to support@example.com"}} ``` Available skills: marketing, analytics, seo, social, office, email, calendar, documents, management ### Option B: MCP Protocol For full MCP clients such as Claude, Cursor, and ChatGPT Developer Mode: POST https://sharksapi.ai/mcp/{botType} Authorization: Bearer {token} Content-Type: application/json Accept: application/json Step 1 — Initialize: {"jsonrpc":"2.0","method":"initialize","id":"1","params":{}} Step 2 — List tools: {"jsonrpc":"2.0","method":"tools/list","id":"2","params":{}} Step 3 — Call tool: {"jsonrpc":"2.0","method":"tools/call","id":"3","params":{"name":"get_ga4","arguments":{...}}} botType options: marketingbot, managementbot For normal ChatGPT Apps/Connectors, do not use the bot-scoped URLs. Use `POST https://sharksapi.ai/mcp/chatgpt`, which exposes the OpenAI-compatible `search` and `fetch` tools. ## Available Services (by category) ### Analytics & SEO (OAuth) - ga4 — Google Analytics 4 (traffic, audience, conversions; any dimension × metric report, realtime, funnels) [config: property_id] - gsc — Google Search Console (search performance, keywords, indexing) [config: site_url] - bing — Bing Webmaster Tools (Bing organic search clicks/impressions/queries/pages, crawl & index stats) [api_key auth, config: site_url] - microsoft_clarity — Microsoft Clarity (UX session insights — dead clicks, rage clicks, scroll depth, JS errors; last 1–3 days only) [api_key auth, no config required] - dataforseo — DataForSEO (SERP results, keyword search volume/CPC/competition, domain ranked keywords, backlinks summary) [api_key auth with login+password, no config required] - google_ads — Google Ads (campaigns, keywords, bidding; writes through the approval gate: pause/enable campaigns, daily budgets under human-set ceilings, negative keywords, ad schedule, responsive search ad texts) - google_business — Google Business Profile (reviews, local SEO, Maps/Search visibility) [config: location_id; the account is looked up] - google_alerts — Google Alerts (brand mentions, keyword monitoring, web monitoring via RSS) [no credentials needed, config: rss_feeds array] - google_tag_manager — Google Tag Manager (tags, triggers, variables) ### Social Media (OAuth) - facebook — Facebook Pages (posts, insights, engagement) [config: page_id] - instagram — Instagram Business (posts, stories, insights) [config: ig_business_account_id] - linkedin — LinkedIn Company Pages (posts, analytics) [config: organization_urn] - twitter — X (read-only with the owner's own X API key: profile, own posts, post lookup, recent search; X bills the reads to the owner) [api_key auth: bearer_token + username] - tiktok — TikTok (account stats: followers/likes/videos + own videos with engagement, via Display API OAuth; ads reporting via advertiser token) - bluesky — Bluesky (posts, engagement) - youtube — YouTube (channel statistics and YouTube Analytics: views, watch time, likes, comments, shares, subscribers gained/lost, top videos; read-only) [config: channel_id] ### Advertising (OAuth) - meta_ads — Meta Ads / Facebook Ads (campaigns, ad sets, performance; writes through the approval gate: pause/enable campaigns, ad sets and ads, daily budgets under human-set ceilings (daily_budget_eur, or daily_budget_minor in the account currency; a non-EUR account is compared at the ECB reference rate, rounded down), paused ads from client-approved creatives — needs the ads_management permission; when the connection also granted ads_mcp_management, Meta's own ads MCP server: 26 read tools (anomalies, industry and auction benchmarks, peer comparison, opportunity score, delivery errors, activity log, the entity report, ad previews, experiments and test eligibility, audiences, custom conversions, Pages, Instagram accounts, media library, creatives, Help Center and an EU Ad Library search) and 12 approval-gated writes: create_meta_campaign, create_meta_adset, create_meta_ad and create_meta_creative (always PAUSED, or an Ads Manager draft staged with status PAUSED that a person publishes in Ads Manager; a budget set at creation is in the minor unit of the ad account currency and must fit the two daily ceilings, which are converted from EUR at the ECB reference rate (rounded down) on a non-EUR account; no rate, no budget), upload_meta_ad_media (public URL), update_meta_entity (names, targeting, schedule, placements, status PAUSED/ARCHIVED; budgets, bids and starting delivery stay with set_meta_*_budget and enable_meta_*), update_meta_creative, create_meta_audience / update_meta_audience (website, engagement, lookalike, empty customer list; no member data), and the hard limits delete_meta_creative, delete_meta_audience and create_meta_ab_test. Every id, Page, Instagram account, pixel, lead form, audience and landing page is checked against the project before Meta sees the call; catalogs, pixel event rules, lift studies, Instagram boosts and publishing a draft are not offered) [config: ad_account_id] - google_ads — Google Ads (see above) - google_merchant_center — Google Merchant Center (product feed status and supplemental corrections) - google_data_manager — Google Data Manager (offline conversion uploads) ### SEO & keyword data - ahrefs — Ahrefs on the owner's own Ahrefs API v3 key (domain rating, backlinks, referring domains, organic keywords, top pages, organic competitors, keyword metrics and ideas, volume history; spends the owner's Ahrefs API units, at least 50 a request) [api_key auth, no config required] - semrush — Semrush on the owner's own Semrush API v3 key (domain overview, organic keywords, organic competitors, keyword gap per regional database; the Standard API needs a Business plan with API units and spends them) [api_key auth, no config required] - google_trends — Google Trends (interest over time, related queries; no credentials needed) - google_keyword_planner — Google Keyword Planner (keyword ideas and volumes) - ubersuggest — Ubersuggest (keyword and domain data; no credentials needed) ### Websites - wordpress — WordPress (posts, pages, SEO meta, redirects, schema) [application password] - sftp — SFTP site files (read/write with backup, lint and automatic rollback) ### E-mail & e-mail marketing - email / marketing_email / office_email — your own mailbox over SMTP/IMAP (send_email, schedule_email, get_emails) - resend — Resend (transactional e-mail API) - activecampaign — ActiveCampaign (contacts, deals, campaigns, automations) ### Reviews & forms - trustpilot — Trustpilot (reviews, replies) - jotform — Jotform (forms and submissions) ### Google Workspace (OAuth) - google_calendar — Google Calendar (events, scheduling) - google_drive — Google Drive (files, folders) - google_sheets — Google Sheets (read, write data) - google_docs — Google Docs (read, create, append) SharksAPI is a marketing platform: sales, CRM, accounting, ERP, banking, payments, HR and logistics integrations are not offered (removed 30.09.2026). ### Other (no connection needed) - scraper — Web scraping and crawling (always available) - pagespeed — Google PageSpeed Insights (always available) - facebook_ad_library — Public Facebook Ad Library lookup via `check_facebook_ads` tool. Check whether any domain or brand is actively advertising on Facebook/Instagram. No Meta connection required — uses App Access Token from server env. Returns `is_advertising`, `total_found`, `sample_ads[]`, `search_url`. ## Team Invites — share full access with another person's Cowork To give a colleague the SAME access you have (so their Claude Cowork can command the same team — Turundusjuht, SEO agent, etc.), call the **`invite_teammate`** MCP tool: ```json {"tool": "invite_teammate", "arguments": {"email": "colleague@example.com", "name": "Mari"}} ``` It creates a `TeamInvite` for YOUR project (full scopes by default; pass `scopes`/`expires_days` to narrow) and returns an `invite_token`, an `accept_endpoint`, and a ready-to-send `recipient_instruction`. Give the `recipient_instruction` (or just the `invite_token`) to the colleague — **no web page needed**. **The colleague's own agent accepts it, fully A2A:** ```http POST https://sharksapi.ai/api/v1/a2a/accept-invite Content-Type: application/json {"invite_token": "", "name": "Mari"} ``` No prior auth — the `invite_token` is the authorization. Response: ```json {"success": true, "recovery": false, "data": { "agent_id": 123, "client_id": "agent_...", "client_secret": "", "mcp_url": "https://sharksapi.ai/mcp/", "token_url": "https://sharksapi.ai/oauth/token", "grant_type": "client_credentials", "scopes": ["marketing:read", ...], "project": "..." }} ``` From then on the colleague's Cowork uses those credentials (one `POST /oauth/token`, then that same token on every `POST /api/v1/a2a` call, or add `mcp_url` as a connector) and can run `read_dashboard`, `delegate_to_agents`, `set_marketing_plan`, etc. against the shared project — exactly like the inviter. If `recovery: true` comes back, the email already had an agent and the secret was just **refreshed** (client_id + connections unchanged; old tokens stop working). Re-calling `invite_teammate` for the same pending email reuses the invite (no duplicates). > Web fallback: the same invite also works at `https://sharksapi.ai/team-invite/{invite_token}` (enter name in a browser) for people who aren't onboarding via an agent. **Lost credentials?** If a teammate already has an agent on the project but lost their one-time `client_secret` and can't finish Cowork setup, just `invite_teammate` them again. The response comes back with `recovery:true`; when they open the link and enter their name, the platform REFRESHES the secret on their existing agent (their `client_id` and connections stay) and shows the setup page with a fresh secret. Their old secret/tokens stop working. No need for the magic-link dashboard rotation. ## Dashboards (always available) SharksAPI lets you build **persistent public dashboards** at `https://sharksapi.ai/{token}/index.html` that mix integration data (GA4, GSC, Facebook, LinkedIn, etc.) with agent-generated content (marketing plans, tasks, commentary). Every dashboard has a password you pick yourself (required, never removable); viewers open it with the URL plus that password, and the business owner's people sign in with a one-time e-mail link instead. Data is fetched with hybrid caching (5 min GA4, 15 min GSC, 1h social) and the page has a built-in time range filter that re-fetches widgets live. **A2A tools** — always available regardless of which integrations are connected: - `create_dashboard` — Persist a new dashboard with widgets, returns a `public_url` - Self-serve business (no agency): `create_dashboard` with `role: "manager"` and `self_serve: true` makes the owner the admin of an English dashboard: Today, Decisions, Plan, Brand, Content and social, Channels, Website and Settings (demo with a made-up business: https://sharksapi.ai/demo-app). Make it the project's first dashboard: SharksAPI then e-mails the owner a one-time sign-in link to it, in English; send them only that link, never the password. The owner signs in with an e-mail link and decides: the plan, every approval, autonomy, budgets and daily limits, their own dates, rules and competitors (these reach you as pinned memory constraints: follow them). Write for the owner, not a marketer: `client_summary` (one plain sentence) when you complete a task, `reason` (one plain sentence on why) on every write that waits for approval, the weekly text with `write_weekly_summary` (else the server writes it on Monday morning), and answers to "Ask your team" with `get_client_messages` / `reply_to_client`. Then `invite_client_person` for more people. SharksAPI runs no agents for the client: you (and any other AI agents your person runs) do the work. Help your person set up one scheduled task per kind of work in their own AI client: `get_onboarding_status` gives `recurring_jobs` (a night job per channel of the plan, such as SEO and Google Ads, half an hour apart, each with its prompt and time, plus the marketing director's morning job when SharksAPI does not run the director itself) and `recurring_plan` (what it costs in credits); confirm the jobs you scheduled with `set_project_profile` `scheduled_jobs`. Each night job starts with `get_my_tasks` with its `channel`: that channel's open work, or in `next` the step to take when nothing is open (one card under the plan's pillar on the manager page, done that night). It does at most `tasks_per_night` tasks (the owner's choice, 1 to 3, asked in the interview and changeable in Settings) and adds nothing that waits for the owner once `decisions_waiting` reaches `decisions_brake` (both from `get_my_tasks`); if your person runs more agents, give each one a board under the manager page (`create_dashboard` with `manager_token` and `agent_key`, made by that agent): it then is the channel's specialist on the owner's dashboard and the owner's questions about that channel come to its board. Hand out work with `delegate_to_agents`. - `read_dashboard` — **Read a full dashboard (layout + LIVE widget data) in one call. ALWAYS use this to read a dashboard — never open the `/{token}/index.html` URL in a browser (slow, wasteful).** Returns every widget's current values (metrics, chart series, tables), strategy cards with task ids + status + delegation metadata, the shared marketing-plan context, the manager rollup for manager tokens, AND `action_items` — draft to-dos the manager's review created (`drafts_to_revise`, `drafts_to_publish`), **scoped to the calling agent** (only the drafts you submitted, so teammates don't collide). Process action_items first: revise_draft the ones sent back, publish the approved ones. Params: `token`, optional `start_date`/`end_date`, `include_data` (false = layout only), `max_table_rows`. - `get_dashboard` — Fetch a dashboard's config by token (structure only, no data — prefer `read_dashboard`) - `update_dashboard` — Partial updates (name, widgets, dates) - `delete_dashboard` — Permanently remove a dashboard (cascades to widgets + cache) - `invalidate_dashboard_cache` — Force all widgets to refetch on next view **Team / manager A2A tools** (for the Turundusjuht orchestration model): - `get_team_capabilities` — **Orientation: call this FIRST when planning.** Returns the agent roles available on THIS project (seo, content, social, paid, events, analytics), what each does, which data sources are LIVE vs missing, recommended skills, whether a manager dashboard exists, and the planning recipe. Works before any dashboard exists. - `set_marketing_plan` — Manager sets the shared plan (north_star, KPIs, pillars with agent_keys) - `link_to_manager` — Attach a standalone agent dashboard under a manager (or detach) - `delegate_to_agents` — Manager pushes work to one or more teammate agents at once (depends_on + conditions); each becomes a strategy card stamped "Turundusjuhilt" - `manage_strategy_card` — Manager deletes / pauses / resumes / re-prioritises / reassigns a strategy card - `propose_plan_input` — Teammate proposes a bottom-up input into the manager's plan - `withdraw_plan_input` — The proposing agent takes its own input back (`input_id`, optional `reason`) while it is still `proposed`; the status becomes `withdrawn` and it leaves the manager's list. Inputs of another agent, inputs already accepted or declined, and older inputs with no recorded proposer are refused: the manager declines those. **Turn a brief into a whole plan:** install the `marketing-planner` skill (`https://sharksapi.ai/skills/marketing-planner.skill.md`, using `Authorization: Bearer `). Given a freeform brief ("annual plan, grow visits 300% with SEO/social/blog/events"), it runs get_team_capabilities → set_marketing_plan → create_dashboard team → delegate_to_agents → add_plan_activity, distributing the work across the dashboard. **Approvals — content drafts (always available):** agents submit content for the manager to review; the decision becomes the agent's next to-do (seen in `read_dashboard` action_items). - `submit_draft` — Agent submits content for approval (type: social_post / web_text / newsletter / blog / ad_text / event_text / campaign_message / seo_change; title, body, channel, related_activity, deadline, priority). Appears in the manager's "Vajab kinnitamist" panel + `/{token}/inbox` ("Postkast" — the single queue of drafts, tool approvals and human tasks; `/approvals` and `/human-actions` redirect there). On a self-serve dashboard it is a card in Decisions (`/{token}/decisions`; `/inbox` redirects there). - `list_drafts` — List drafts (filter by status, or "open" for the review queue). - `review_draft` — Manager action on a draft: `approve` / `request_changes` (+note) / `edit` (+body) / `schedule` (+scheduled_at) / `reject` (+note) / `publish`. - `revise_draft` — Agent revises a `changes_requested` draft (new body) → back to pending for re-approval. **Annual plan / calendar (always available):** the Monthly/Annual view at `/{token}/plan`. - `add_plan_activity` — Add an activity to the calendar (kind: recurring / seasonal / one_time; months[], date, channel, agent_key, status, optional `content_draft_id` link). - `list_plan_activities` — List activities (filter by month or status); includes each linked draft's approval status. - `update_plan_activity` — Update an activity's status, months, date, channel, linked draft or notes. All draft/plan/KPI content must use only anonymous marketing data — never applicant PII (enforced server-side). **Memory layer (always available) — the workspace's shared brain.** Every agent and the human see the same working state across models and devices, so nothing is re-asked and nothing is done twice. - `memory_bootstrap` — call FIRST at session start (unless the orchestrator handed you context in the A2A task payload): one call returns the composed context within a ~2500-token budget — all global constraints (incl. the per-channel autonomy setting manual/approve/auto) and facts, your channel's open task_state entries, latest decisions/results/lessons. Orchestrator may pass `role` to compose a package for a channel agent before delegating. - `memory_write` — WRITE-THROUGH while working: record every important decision, result, lesson or task_state IMMEDIATELY (an interrupted session must not lose memory). Entry style: short, dated, measurable. Types: fact / constraint (orchestrator+human only) / decision / result / lesson / task_state (link `task_id` to the command-center task). RBAC is enforced server-side: a channel agent (agents.memory_role, e.g. "seo") writes only its own `channel:` + `private:` scopes — writing another channel or `global` returns an error. Duplicates get a supersede suggestion. - `memory_search` — full-text search over everything you may read, including the archive. - `memory_update` / `memory_archive` — amend or retire entries you own. - `memory_review` — orchestrator only: duplicates/expired/stale for weekly consolidation (automatic job also runs weekly). - End of session: update your `task_state` (what was done, what is next). - External clients (your own Claude Desktop / Claude Code / Codex on any device) read the same memory via MCP with the workspace token — read-only in v1. **Role skills — install the playbooks for the agent you just created.** When you create or link a team agent (or call `read_dashboard` on it), the response includes `recommended_skills` with two parts: `skills` — role-matched platform skill.md URLs (e.g. agent_key `seo` → seo-audit, weekly-seo-review, keyword-research, technical-seo-checker, serp-analysis, competitor-watch); and, if the project has any, `team_skills` — your team's CANONICAL contributed skills (fetch each with `get_team_skill(slug)`). **Install both: download platform URLs with `Authorization: Bearer `, then save the files and team-skill content as `.claude/skills/{name}/SKILL.md`** so they load in every session. Prefer a team canonical skill over the platform default where the topic overlaps. Platform catalog: `GET /api/v1/a2a/skills` or `https://sharksapi.ai/skills/{name}.skill.md`. ### Shared team skill library (contribute + combine the best) Beyond the platform skills above, each project has a SHARED library where teammates contribute the skills they build in their own Cowork, and the manager promotes the best. Five MCP tools: - `contribute_skill(name, content, slug?, summary?)` — publish a skill.md into the project library. Each call is a new VERSION under the slug, so you and a colleague can each contribute your take on e.g. `seo-audit`. Do this daily to share what you improved. - `list_team_skills(slug?)` — see every team skill, its versions, who contributed each, and which is canonical. - `get_team_skill(slug, version?)` — fetch the full markdown (defaults to canonical, else latest) to read, install, or combine. - `get_skill(slug)` — the current text of any skill you may use: the team's confirmed skill, else the platform skill, else the latest team contribution. `get_my_tasks` names the skill of every open task (`skill.slug`, `match` = title or channel); read it with `get_skill` before the task instead of keeping a local copy, and it is never stale. - `promote_skill(slug, version)` — **manager only** (owner of a manager dashboard, or the project owner): mark a version as the team CANONICAL. **Combine-the-best loop:** teammates `contribute_skill` their versions → the manager `list_team_skills`, `get_team_skill` each variant, asks their Cowork to synthesize the best into one, `contribute_skill`s the merged result, then `promote_skill`s it canonical. The canonical version is what the team installs going forward. (The LLM does the merging — there's no separate merge tool.) ### Widget types - `metric_card` — Single number + label (e.g. "Total Sessions: 12,345"). Uses `grid_cols: 3`. - `chart_line` — Time series line chart. Uses `grid_cols: 6-9`. - `chart_bar` — Bar chart. Uses `grid_cols: 6`. - `table` — Simple data table (first 50 rows shown). - `text_markdown` — Agent-authored markdown content (marketing plans, tasks, notes). **Never cached — stored as-is.** Uses `grid_cols: 12`. - `strategy_card` — Interactive task checklist with expandable strategy/audit detail. Max 5 per dashboard. See strategy card rules below. - `competitor_watch` — Competitor benchmark table: project vs up to 4 competitors across Organic SEO, AI Visibility, Paid Ads, and Social. Agent pushes structured JSON via `content`. Renders colour-coded comparison table (blue project column, green best/red worst per row) + "Peamised järeldused" insight bullets. **Never cached — stored as-is.** Uses `grid_cols: 12`. Content shape: `{project: {domain, seo_score, keywords_top10, avg_position, ai_score, ai_mentions, ai_citations, google_ads, meta_ads, linkedin_ads, fb_followers, linkedin_followers, instagram_followers}, competitors: [...same fields], generated_at, market, insights: [...]}`. ### Create a dashboard (A2A) ``` POST https://sharksapi.ai/api/v1/a2a Authorization: Bearer {token} Content-Type: application/json { "jsonrpc": "2.0", "method": "tasks/send", "id": "req-dash-1", "params": { "tool": "create_dashboard", "arguments": { "name": "Weekly Marketing Overview", "description": "GA4 + social engagement + the plan for this week", "password": "Spring2026!", "default_date_range": "last_30_days", "is_public": true, "widgets": [ { "type": "metric_card", "title": "Total Sessions", "position": 0, "grid_cols": 3, "source": {"tool": "get_ga4", "arguments": {"metrics": ["sessions"], "aggregate": true}} }, { "type": "chart_line", "title": "Daily Sessions", "position": 1, "grid_cols": 9, "source": {"tool": "get_ga4", "arguments": {"metrics": ["sessions", "totalUsers"], "dimensions": ["date"]}} }, { "type": "text_markdown", "title": "Marketing Plan — Week 15", "position": 2, "grid_cols": 12, "content": "## This week's focus\n\n1. Launch LinkedIn campaign for Q2 product\n2. A/B test new landing page copy\n3. Review last week's email open rates" } ] } } } ``` **Response:** ``` { "jsonrpc": "2.0", "id": "req-dash-1", "result": { "dashboard_id": 42, "public_token": "xK3p8AqM4nB2vFg7rT9yL1eHs6dZj0wQ", "public_url": "https://sharksapi.ai/xK3p8AqM4nB2vFg7rT9yL1eHs6dZj0wQ/index.html", "widget_count": 3, "message": "Dashboard created. Share the public_url AND the password with viewers — they need both to access it." } } ``` `password` is required: pick a strong one yourself (see "Password-protect a dashboard" below); a call without it is rejected. **Give the `public_url` and the password to the user.** They open it in a browser, see live data with a date filter, and can share both with the people who should see it. ### Key rules - **Integration tool widgets** (`metric_card`, `chart_line`, `chart_bar`, `table`) need a `source: {tool, arguments}` pointing at an existing MCP tool (e.g. `get_ga4`, `get_search_console`, `get_facebook`; for any other GA4 breakdown `get_ga4_custom_report` with `dimensions` and `metrics` — its `rows` feed tables and charts). The dashboard's date range filter is automatically merged into the tool's arguments on each view. - **Text widgets** (`text_markdown`) use `content` (markdown string) instead of `source`. These are agent-authored — you generate the content in your conversation and pass it as-is. - **Grid layout**: 12-column system. Typical combos: `metric_card` at 3, chart at 6-9, `text_markdown` at 12 (full width). - **Soft limit**: 50 widgets per dashboard. - **Default language: English.** Use English for `name`, `description`, widget `title`, and markdown `content` unless the user explicitly asks for another language. Dashboards are public share-links — even if the user chats with you in Estonian/German/etc., they usually want an English page they can share with their team. - **Cache TTL defaults**: 5 min (GA4), 15 min (GSC, Clarity), 1h (social media). Override per widget with `cache_ttl_seconds`. - **Cross-project**: dashboards are scoped to your project. You can't access another project's dashboard. - **Strategy cards**: Widget type `strategy_card` — AI-built strategies with interactive task checklists. Card-level mode: `human_controlled` or `ai_controlled`. Each task has an `effective_mode` = per-task `task_mode` if explicitly set, otherwise inherits the card mode (`ai_controlled` → `ai`, `human_controlled` → `human`). Per-task `task_mode` (`human` | `ai` | `paused`) only overrides when explicitly set — null means inherit. Tools: `update_strategy_task`, `get_strategy_status`, `delete_strategy_task`. Max 5 per dashboard. - **Strategy skills**: `GET /api/v1/a2a/skills` returns `strategy_skills[]` with skill.md URLs to download using `Authorization: Bearer ` (SEO audit, content strategy, social media plan, CRO). Each skill describes the data collection → analysis → strategy card creation workflow. ### Update a dashboard's marketing plan (agent content) ``` { "tool": "update_dashboard", "arguments": { "token": "xK3p8AqM4nB2vFg7rT9yL1eHs6dZj0wQ", "update_widgets": [ {"position": 2, "content": "## Week 16 focus\n\n1. Publish case study\n2. Run LinkedIn ad retargeting"} ] } } ``` Updating a widget automatically invalidates its cache. ### Password-protect a dashboard Every dashboard needs a password. Pick a strong one yourself (do not ask the person for it) and pass it as `password` in `create_dashboard` or `update_dashboard` — the server stores a bcrypt hash, never plaintext. ``` { "tool": "create_dashboard", "arguments": { "name": "Q2 Sales Pipeline (Private)", "password": "Spring2026!", "widgets": [...] } } ``` Response includes `has_password: true`. Tell the user **two things**: the `public_url` AND the password. Viewers see a password gate before the dashboard renders. Once unlocked, a 24h cookie keeps them in. On a self-serve dashboard tell the owner only the link: they sign in with the e-mail link SharksAPI sends. A dashboard always keeps a password (its URL is public): `password: null` or an empty password is refused. To change the password: ``` { "tool": "update_dashboard", "arguments": {"token": "...", "password": "new-secret"} } ``` ### Strategy cards — AI-built strategies with task checklists Create a strategy card with prioritized tasks that humans or AI can check off: ``` { "tool": "update_dashboard", "arguments": { "token": "...", "add_widgets": [{ "type": "strategy_card", "title": "SEO Strategy — Week 16", "position": 0, "grid_cols": 12, "content": "## Analysis\nBased on GSC data...", "source": { "mode": "human_controlled", "tasks": [ {"title": "Update meta description on /pricing", "description": "CTR is 1.2% with 3.4K impressions"}, {"title": "Add FAQ schema to /how-it-works"}, {"title": "Compress hero images on /features (>500KB)"} ] } }] } } ``` Mode: `human_controlled` (browser checkboxes) or `ai_controlled` (agent-focused queue). Agents can still mark any accessible task via API; the mode is coordination metadata for humans and scheduled agents. **Check task progress** (before creating next week's strategy): ``` {"tool": "get_strategy_status", "arguments": {"token": "...", "widget_id": 42}} ``` Returns: title, mode, progress_pct, tasks with completion state and who completed them. Each task includes `id` (DB id — the `#id` shown on the dashboard) and `task_number` (1-indexed position on the card). Either can be passed to `update_strategy_task`. Each task returns `task_mode` (explicit override: `human` | `ai` | `paused` | null) and `effective_mode` (resolved: `ai` or `human`). `effective_mode` = `task_mode` if set, else inherits from the card's mode. Also returns `note` and `label` if set. **Mark a task as completed**: ``` {"tool": "update_strategy_task", "arguments": {"token": "...", "widget_id": 42, "task_number": 2, "is_completed": true}} ``` Identify the task by `task_id` (DB id — the `#id` the dashboard shows) OR `task_number` (1-indexed position on the card). `task_id` wins if both supplied. `update_strategy_task` may mark any accessible strategy task, including tasks whose `effective_mode` is `human` or `paused`. The update is recorded with `completed_by: "ai"` when completed via the agent API. Use `get_strategy_status` first so you do not redo completed work and so humans can see the current coordination mode. **Mark a task as blocked / add a note** (when you cannot complete a task): ``` {"tool": "update_strategy_task", "arguments": {"token": "...", "widget_id": 42, "task_id": 7, "is_completed": false, "label": "blocked", "note": "Cannot proceed — GA4 property not connected."}} ``` Valid `label` values: `blocked`, `needs_human`, `needs_access`, `in_progress`. Omit the key to leave the label unchanged; pass `null` to clear it. Same rule applies to `note`. The dashboard renders the label as a colored badge next to the task title and the note as a small line of text below it — so human viewers immediately see why a task is stalled. **Delete a task** (when no longer relevant): ``` {"tool": "delete_strategy_task", "arguments": {"token": "...", "widget_id": 42, "task_id": 7}} ``` or by 1-indexed task_number: ``` {"tool": "delete_strategy_task", "arguments": {"token": "...", "widget_id": 42, "task_number": 3}} ``` Any agent with access to the project can remove a task with `delete_strategy_task`. Irreversible. Max 5 strategy cards per dashboard. Strategy cards appear on the dashboard with a progress bar, interactive checkboxes, and a mode toggle (Human/AI Agent). Completed cards (100%) auto-hide from the main view — a "History" button appears in the Command Center header to reveal them. ### Strategy execution skills SharksAPI hosts downloadable skill.md files that tell the agent HOW to execute strategies. Every request to `/skills/{name}.skill.md` or `/plugin/*` requires `Authorization: Bearer `. Register and exchange client credentials as described above; reuse that access token until it expires. The catalog and `/claude-app/*` bootstrap remain public. **Discover available skills:** ``` GET /api/v1/a2a/skills ``` Returns `strategy_skills[]` with `id`, `url`, `triggers[]`, and `category`. Categories: `sharksapi` (use connected data), `cross_cutting`, `social`, `ads`, `analytics`, `research`, `email`, `seo_research`, `seo_build`, `seo_optimize`, `seo_monitor`, `seo_protocol`, `seo_local`. **Download and follow a skill:** ``` GET https://sharksapi.ai/skills/seo-audit.skill.md Authorization: Bearer ``` Each skill.md contains phased instructions: data collection → analysis → strategy card creation → execution → weekly follow-up. **Available SharksAPI skills** (use connected integrations → strategy card): - `seo-audit.skill.md` — GSC + GA4 + PageSpeed + SERP top-10 benchmark (keyword usage, intent, schema, speed, backlinks vs competitors) → top 10 SEO tasks (one-time audit) - `weekly-seo-review.skill.md` — recurring weekly review: pull GA4 + GSC, check previous strategy card progress, carry forward incomplete tasks, create new week's card. Replaces local file-based todo tracking. Includes SEO indexing rule (don't re-optimize pages changed <2-4 weeks ago). - `content-strategy.skill.md` — search queries → content publishing plan - `social-media-plan.skill.md` — Facebook + LinkedIn → weekly posting plan - `conversion-optimization.skill.md` — GA4 events + Clarity → CRO tasks - `blog-writer.skill.md` — research topic online + via SharksAPI (GSC, GA4, WP), write SEO-optimized article with SILO internal links, styled HTML comparison tables (color-coded costs), JSON-LD schema (Article + FAQPage + Breadcrumb), featured image (AI-generated or stock suggestion), built-in proofreading checklist, topic uniqueness check against existing posts, publish as WordPress draft. Project-agnostic. - `paid-ads-strategy.skill.md` — audit Google Ads + Meta Ads via SharksAPI (get_google_ads, get_meta_ads), find wasted spend and optimization opportunities, create strategy card with tasks. Sub-skills for deep audits: ads-google (40 checks), ads-meta (50 checks), ads-creative, ads-budget, ads-landing, ads-plan. - `command-center-agent.skill.md` — recurring agent task: check dashboard strategy cards for pending AI-controlled tasks, execute them using SharksAPI tools (SEO, content, analytics), mark complete via update_strategy_task. Use as Claude Cowork recurring task or scheduled agent. Replaces Chrome-based dashboard monitoring with direct A2A API calls. **Execution team skills** (26 skills — the AI marketing team's execution layer; adapted from MIT-licensed marketingskills/claude-skills onto SharksAPI tools, memory, drafts and dashboards): - `marketing-context.skill.md` — shared "brand brain": product, ICP, JTBD, competitors, positioning, voice, constraints, goals. Auto-drafts from website + connected data, separates confirmed facts from assumptions, stores `context:*` entries in shared memory for every other agent. Manager/orchestrator maintains it; channel agents consume it via memory_bootstrap. - `social-content-agent.skill.md` — recurring social execution: platform-native LinkedIn/Facebook/Instagram/TikTok/X content from real channel performance, repurposing, weekly calendar, social listening + engagement triage. Everything publishable flows through submit_draft approval; publication verified before tasks complete. - `paid-ads-operator.skill.md` — campaign execution loop on top of the ads audit skills: objective → tracking validation → build spec → approval → launch → monitor → kill/keep/iterate/scale. Strict budget approval rules; changes applied with the approval-gated Google Ads / Meta Ads write tools and verified by reading account data back. - `ad-creative-factory.skill.md` — ad creative production at scale: RSA assets, Meta/LinkedIn copy, short-video hooks/scripts, static concepts, retargeting variants — grouped by strategic angle with a hypothesis each, char-limit validated, approval-gated. The ads-creative audit skill remains the QC layer. - `meta-creative-intel.skill.md` — weekly Meta creative loop: get_meta_ad_insights fatigue verdicts (frequency up AND efficiency down on enough spend), get_meta_ad_creatives concept clusters + disapproval reasons → hold/refresh/pause + differentiated concepts through approval. - `meta-lead-quality-loop.skill.md` — CRM stages → Meta Conversions API (send_meta_conversion_events, hashed server-side, test code first) → Conversion Leads test judged on cost per qualified lead. - `meta-competitor-ad-intel.skill.md` — search_meta_ad_library by page ids: long-runners, new launches, EU reach/targeting, monthly snapshots, angle map vs own ads → evidence-linked concept hypotheses. - `campaign-analytics-agent.skill.md` — cross-channel measurement: measurement plans, tracking validation, UTM conventions, funnel rates, CPA/CAC/ROAS, attribution honesty, lead quality, conversion lag. Separates observed/calculated/recommended; ends continue/stop/investigate/scale. The guardian against vanity metrics. - `voice-of-customer.skill.md` — mine reviews, surveys, support tickets, CRM notes, communities and emails for real customer language: JTBD, pains, triggers, objections, money quotes — provenance-first, verbatim vs summary separated, anonymized; outputs feed positioning, ads, landing copy, social, SEO and sales. - `experiment-agent.skill.md` — A/B tests with statistical discipline: pre-registered hypotheses in shared memory (`exp:*`), honest sample-size math, no peeking, ship/kill/inconclusive verdicts. Channel agents implement variants; campaign-analytics-agent owns the metric conventions. - `email-lifecycle-agent.skill.md` — lifecycle email as a system (welcome, nurture, re-engagement, newsletters) with triggers and exit conditions. The one channel with real write tools: after draft approval it sends via send_email/schedule_email and verifies via campaign stats. Deliverability + list hygiene built in. - `local-seo-agent.skill.md` — local search execution on the real stack: Google Business Profile insights + reviews, GSC local queries, LocalBusiness schema, mobile PageSpeed, local SERP tracking, NAP consistency, review replies (Trustpilot direct, Google as paste-ready approved text). - `programmatic-seo.skill.md` — disciplined pSEO: keyword pattern → SERP viability gate → unique-data dataset → 10–20 page WordPress draft pilot through approval → GSC indexing check → scale in tranches. Anti-doorway-page guardrails; content-quality-auditor as the ship gate. - `keyword-cannibalization-resolver.skill.md` — GSC query×page collisions → SERP intent check → one survivor by traffic/link evidence → one fix per cluster (merge+301, differentiate, canonical, noindex) through approval; measured with list_change_impacts. - `traffic-drop-forensics.skill.md` — organic drop root cause: tracking vs real, Google Search Status incidents, own changes, seasonality, loss concentration, SERP/AI Overview displacement, technical regressions → one primary cause with evidence + recovery card. - `ai-crawler-access.skill.md` — AI bot access layer: per-bot robots.txt (search vs user-triggered vs training), llms.txt validity, facts in server HTML vs JS-only; approved robots/llms.txt drafts. - `index-coverage-operator.skill.md` — weekly tier-1 indexing loop on Google's own URL Inspection verdicts (inspect_gsc_url), sitemap read status and fetch-as-Googlebot checks; fix by cause, submit via Bing/IndexNow, re-check in 7–14 days. - `indexnow-publisher.skill.md` — IndexNow on the project's own hosts: key file once (SFTP mu-plugin / human / Rank Math), then only changed and submittable URLs (gated with check_url_status) pinged via submit_indexnow to Bing, Yandex, Seznam, Naver, Yep; crawl verified with get_bing_url_info. No double-pinging; Google does not use IndexNow. - `link-reclamation.skill.md` — free URL-level backlinks (Bing Webmaster get_bing_backlinks + GSC referring URLs) → dead linked URLs via check_url_status → 301 map; approval-gated outreach for unlinked brand mentions; won/lost tracking. - `seo-links.skill.md`: classic link + citation building: verified NAP packet → liveness-checked Estonian/Baltic register (NETI dofollow, 1182, Radar, vertical portals, maps, B2B/SaaS, PR) → submit with client-email/moderator confirmation → one batched human session (Smart-ID, SMS, video, payment) → read back live listing, NAP and real rel. Google link-spam guardrails. - `site-crawl-audit.skill.md` — full-site technical SEO crawl of the client's own domain (`start_site_crawl` → `get_site_crawl_issues`): broken links, redirects, duplicates, canonicals, hreflang, orphans, sitemaps; prioritised with GSC and verified by a re-crawl. - `agent-readiness.skill.md` — can AI browsing agents complete quote/booking/checkout: server-HTML facts, schema vs visible data, labeled controls, overlays, CLS; scored with competitor benchmark. - `multilingual-market-seo.skill.md` — hreflang audit, language-coverage matrix, wrong-language ranking by GSC country, demand per market, translation briefs (et/ru/en/fi/lv). - `merchant-feed-agent.skill.md` — product data consistency across catalog, Merchant Center feed, Product/Offer schema and the page; supplemental-feed corrections through approval. - `google-ads-offline-conversions.skill.md` — send CRM outcomes (qualified lead, won deal with value) to Google Ads through the Data Manager API, approval-gated, with daily uploads, match-rate read-back and a volume-gated switch of bidding to qualified leads. - `social-community-manager.skill.md` — Daily inbox for Facebook and Instagram comments (including ad posts), Google and Trustpilot reviews and brand mentions: triage, approved replies in the brand voice, spam and scam hiding, crisis escalation, 24-hour reply-time tracking. **Indexing & free backlink tools:** `inspect_gsc_url` (Google URL Inspection: coverage state, canonical, last crawl — gsc), `list_gsc_sitemaps` (gsc), `get_bing_url_info` / `get_bing_backlinks` (free URL-level backlinks with anchors) / `submit_bing_urls` (bing), `submit_indexnow` (IndexNow ping for the project's own hosts; first call returns the key file to publish), `check_url_status` (status + redirect chain, X-Robots-Tag, meta robots, canonical, hreflang as browser / Googlebot / GPTBot / ClaudeBot / PerplexityBot sees it — always available). **Available SEO/GEO execution skills** (20 skills from seo-geo-claude-skills): - Research: keyword-research, competitor-analysis, serp-analysis, content-gap-analysis - Build: seo-content-writer, geo-content-optimizer, meta-tags-optimizer, schema-markup-generator - Optimize: on-page-seo-auditor, technical-seo-checker, internal-linking-optimizer, content-refresher - Monitor: rank-tracker, backlink-analyzer, performance-reporter, alert-manager - Protocol: content-quality-auditor (80-item CORE-EEAT), domain-authority-auditor (40-item CITE), entity-optimizer - Memory: memory-management All served at `https://sharksapi.ai/skills/{name}.skill.md` with `Authorization: Bearer ` **Typical agent workflows:** One-time audit: 1. User: "Do an SEO audit for my site" 2. Agent: `GET /api/v1/a2a/skills` → match trigger → download `seo-audit.skill.md` with `Authorization: Bearer ` 3. Agent follows phases: call get_gsc_top_queries, analyze_pagespeed, etc. 4. Agent creates strategy_card on dashboard with 10 tasks 5. Human checks off tasks in browser (or agent executes in AI-controlled mode) Recurring weekly review: 1. User sets up recurring task: "Weekly SEO review using SharksAPI" 2. Agent downloads `weekly-seo-review.skill.md` with `Authorization: Bearer ` → follows 6 steps: - `get_strategy_status` on last week's card → see what's done - Pull GA4 + GSC for last 7 days - Carry forward incomplete tasks + add new ones from fresh data - Create new strategy_card on dashboard 3. Dashboard accumulates weekly cards as a timeline (archive after 4 weeks) Paid ads audit: 1. User: "Audit our Google Ads and Meta Ads" 2. Agent downloads `paid-ads-strategy.skill.md` with `Authorization: Bearer ` 3. Calls `get_google_ads` + `get_meta_ads` + `get_ga4_channels` + `analyze_pagespeed` 4. Identifies waste (campaigns with spend but no conversions), low ROAS, fatigued creatives 5. Creates strategy_card with optimization tasks (pause waste, reallocate budget, refresh creatives) 6. For deeper audits: downloads sub-skills (ads-google 40 checks, ads-meta 50 checks, ads-creative, ads-budget, ads-landing) Command Center agent (recurring): 1. Set up as Claude Cowork recurring task or scheduled agent (1-5x daily) 2. Agent downloads `command-center-agent.skill.md` with `Authorization: Bearer ` 3. Calls `get_dashboard` → finds strategy_card widgets 4. Calls `get_strategy_status` per card → finds pending tasks, prioritizing ai_controlled tasks 5. Executes tasks using SharksAPI tools (analyze_pagespeed, create_wp_post, etc.) 6. Marks done via `update_strategy_task` 7. Reports summary. Uses A2A API only — no browser/Chrome needed. Blog writing: 1. User: "Write a blog post about referral marketing" 2. Agent downloads `blog-writer.skill.md` with `Authorization: Bearer ` → follows phases: - Research topic online + via GSC/GA4 - Check existing posts to avoid duplicate topics - Find SILO links (service pages + related posts via list_wp_posts) - Write article with styled HTML comparison tables, JSON-LD schema - Generate featured image (AI tool) or suggest stock photo terms - Proofread via built-in checklist (grammar, links, SEO, no em-dashes) - Publish as WordPress draft via create_wp_post - If part of a strategy: mark task complete via update_strategy_task **Important:** if you omit the `password` field entirely from update_dashboard, the existing password is left unchanged. `null` or an empty password is refused: a dashboard always keeps one. ### Markdown widget — what's supported in `text_markdown` content The agent-authored `content` field on `text_markdown` widgets supports a practical subset of markdown for marketing plans, to-do lists, and notes: - Headings: `#`, `##`, `###` - Bullet lists: `- item` or `* item` - Numbered lists: `1. item` - **Task list checkboxes**: `- [ ] todo` (unchecked) and `- [x] done` (checked, strikethrough) - Bold: `**text**` - Italic: `*text*` - Inline code: `` `code` `` - Links: `[label](https://example.com)` — only http(s)/mailto/relative URLs (XSS-safe) - Blockquotes: `> quoted text` - Horizontal rule: `---` - Paragraphs (blank line separates) All HTML in the agent's content is escaped — `