Developer & Agent Docs

AI Agent API

Last updated: 4 Aug 2026

⚡ For Claude Code users

One command installs a skill that auto-loads whenever you mention SharksAPI. Claude handles registration, OAuth URLs, and tool calls — you just tell it what you want.

curl -fsSL https://sharksapi.ai/claude-app/install-skill.sh | bash

After install, say "Connect my GA4 to SharksAPI" and Claude takes it from there. Review the skill file

Agent Registration & API Access

AI Agent API Documentation

OAuth2 Client Credentials Flow (M2M authentication)

AI agents can register instantly. No email verification needed - get started immediately.

Quick Start: Register → Get Credentials → Get Token → Use API


STEP 1: Register Your Agent

Each agent_name + agent_type combination is unique. Registering with the same name returns your existing agent (login).

curl -X POST https://sharksapi.ai/api/v1/agents/register \
  -H "Content-Type: application/json" \
  -d '{
    "agent_name": "My Claude Agent",
    "agent_type": "custom"
  }'

New registration response:

{
  "existing": false,
  "client_id": "agent_abc123xyz...",
  "client_secret": "secret_789def...",
  "warning": "SAVE YOUR CLIENT_SECRET NOW"
}

Already registered? You get:

{
  "existing": true,
  "client_id": "agent_abc123xyz...",
  "note": "Use your existing client_secret to get a token"
}

Lost your secret? Rotate it:

curl -X POST https://sharksapi.ai/api/v1/agents/{agent_id}/rotate-secret \
  -H "Content-Type: application/json" \
  -d '{"client_id": "agent_abc123xyz..."}'

WARNING: Save client_secret immediately. It is hashed and cannot be retrieved.

STEP 2: Get Access Token

Exchange credentials for a Bearer token (valid 1 year):

curl -X POST https://sharksapi.ai/oauth/token \
  -H "Content-Type: application/json" \
  -d '{
    "grant_type": "client_credentials",
    "client_id": "agent_abc123xyz...",
    "client_secret": "secret_789def..."
  }'

Response:

{"access_token": "eyJ0eX...", "token_type": "Bearer", "expires_in": 31536000}

STEP 3: Use API

Make API requests with your access token:

curl https://sharksapi.ai/api/v1/... \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

130+ Integrations Available

Two connection methods:

Accounting & Finance

Merit Aktiva (api_key) · SimplBooks (api_key) · Procountor (api_key) · Lemonsoft (api_key) · Dynamics 365 (oauth) · SAP Business One (api_key) · Fortnox (api_key) · SAP S/4HANA (basic) · Monitor ERP (api_key) · e-conomic (api_key) · Tripletex (api_key) · Visma Net (oauth) · Xero (oauth) · Sage (oauth) · QuickBooks (oauth) · FreshBooks (oauth) · Wave (oauth) · Zoho Books (oauth) · Moneybird (oauth) · bexio (oauth) · Lexware Office (api_key) · FreeAgent (oauth) · Fatture in Cloud (oauth) · Pennylane (api_key) · sevDesk (api_key) · Billomat (api_key) · DATEV (api_key) · Exact Online (oauth) · Twinfield (oauth) · Yuki (api_key) · Symfonia (api_key) · Holded (api_key) · Quipu (oauth) · TeamSystem (api_key) · Cegid (api_key) · Fiken (oauth) · Dinero (oauth) · Billy (api_key) · Netvisor (api_key) · SmartAccounts (api_key) · KashFlow (api_key)

Advertising

Google Ads (oauth) · Meta Ads (Facebook & Instagram) (oauth)

Analytics

Google Alerts (api_key) · Google Analytics 4 (oauth) · Google Search Console (oauth) · Microsoft Clarity (api_key) · Bing Webmaster Tools (api_key) · Google Business Profile (oauth) · PostHog (api_key) · Pendo (api_key)

Banking

LHV Bank (api_key)

Business Intelligence

Looker (oauth) · Tableau (api_key)

CMS

WordPress (api_key)

Communication

Google Chat (oauth)

CRM & Sales

Pipedrive (api_key) · PandaDoc (api_key) · NiftyQuoter (api_key) · Better Proposals (api_key) · Proposify (api_key) · Qwilr (api_key) · SuperOffice (oauth) · weclapp (api_key) · Teamleader (oauth) · Sellsy (oauth)

Databases

Snowflake (api_key)

Development

Azure DevOps (api_key)

E-commerce

BigCommerce (api_key)

E-invoicing

Storecove (api_key) · Finbite (api_key)

Email

Email (SMTP/IMAP) (interactive_form) · Office Email (SMTP/IMAP) (interactive_form) · Resend (api_key)

Email Marketing

Marketing Email (SMTP/IMAP) (interactive_form) · Constant Contact (oauth)

ERP Systems

Myfactory Cloud ERP (api_key) · Comarch ERP (api_key) · Zucchetti (api_key) · Directo (api_key) · Rivile (api_key)

Forms

Google Forms (oauth) · Jotform (api_key)

HR

Deel (api_key) · Greenhouse (api_key) · Personio (api_key) · HiBob (api_key) · Remote.com (api_key) · Oyster HR (api_key)

Lead Generation

Apollo.io (api_key) · Snov.io (api_key) · Clay (api_key)

Logistics

DPD (api_key) · Venipak (api_key)

Marketing Automation

ActiveCampaign (api_key) · Marketo (oauth)

Office & Productivity

Google Calendar (oauth) · Google Drive (oauth) · Google Sheets (oauth) · Google Docs (oauth)

Payments

Wise (TransferWise) (api_key) · Chargebee (api_key) · GoCardless (api_key) · Revolut Business (oauth) · Qonto (api_key) · Mollie (api_key) · SumUp (oauth)

Project Management

Basecamp (oauth) · Wrike (oauth)

Reviews

Trustpilot (api_key) · G2 (api_key) · Capterra (api_key)

Scheduling

Acuity Scheduling (api_key) · Cal.com (api_key)

Analytics & SEO

SEOShark (api_key) · DataForSEO (api_key) · Google Trends (api_key) · Google Keyword Planner (oauth) · Ubersuggest (api_key)

Social Media

Facebook Pages (oauth) · Instagram (oauth) · LinkedIn (oauth) · Twitter / X (api_key) · TikTok (oauth) · Bluesky (api_key)

Social Media Management

Buffer (oauth) · Hootsuite (oauth)

Customer Support

Zoho Desk (oauth) · ServiceNow (api_key) · Gorgias (api_key)

Surveys

SurveyMonkey (oauth)

Full catalog as JSON: https://sharksapi.ai/api/v1/agents/integrations


STEP 4 (OPTIONAL): Connect to Third-Party Services via OAuth

AI agents can connect to Google Analytics 4, Google Search Console, Google Calendar, Google Drive, Gmail, and Notion. The account owner authorizes the connection once, then the agent can use it.

Supported OAuth services: ga4, gsc, google_calendar, google_drive, gmail, notion

Aliases: google_analyticsga4, google_search_consolegsc

Example: Connect Google Analytics 4

curl -X POST https://sharksapi.ai/api/v1/agents/{agent_id}/connections/init \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"service": "ga4"}'

Flow:

  1. Share the direct_oauth_url from the response with the account owner
  2. Owner clicks link and authorizes Google Analytics access
  3. Connection is created automatically
  4. Configure the connection (GA4 needs property_id, GSC needs site_url):
curl -X PUT https://sharksapi.ai/api/v1/agents/{agent_id}/connections/ga4/configure \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"property_id": "YOUR_GA4_PROPERTY_ID"}'

Example: Connect Google Search Console

curl -X POST https://sharksapi.ai/api/v1/agents/{agent_id}/connections/init \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"service": "gsc"}'

After owner authorizes, configure:

curl -X PUT https://sharksapi.ai/api/v1/agents/{agent_id}/connections/gsc/configure \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"site_url": "https://example.com"}'

Connect Multiple Services at Once

curl -X POST https://sharksapi.ai/api/v1/agents/{agent_id}/connections/init-bulk \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "services": ["ga4", "gsc", "google_calendar", "notion"],
    "callback_email": "owner@example.com"
  }'

Check Connection Status

curl https://sharksapi.ai/api/v1/agents/{agent_id}/connections/ga4/status \
  -H "Authorization: Bearer YOUR_AGENT_TOKEN"

Possible statuses:

  • "not_connected" - Use /init to create connection request
  • "pending" - Waiting for owner to authorize
  • "connected" - Ready to use (configure if GA4/GSC)

Connection API Reference

POST   /api/v1/agents/{id}/connections/init             Start OAuth connection
POST   /api/v1/agents/{id}/connections/init-bulk         Connect multiple services
GET    /api/v1/agents/{id}/connections/{service}/status   Check connection status
PUT    /api/v1/agents/{id}/connections/{service}/configure Configure (property_id, site_url)
GET    /api/v1/agents/{id}/connections                   List all connections
POST   /api/v1/agents/{id}/connections/store-credentials  Store credentials directly

List All Connections

curl https://sharksapi.ai/api/v1/agents/{agent_id}/connections \
  -H "Authorization: Bearer YOUR_AGENT_TOKEN"

STEP 5: Query Data from Connected Services

Once a service is connected and configured, use the Analytics API to query live data. All endpoints accept your agent Bearer token.

Complete Agent-to-Agent Flow (Example: GSC)

Here is the full flow from registration to data retrieval:

# 1. Register agent
curl -X POST https://sharksapi.ai/api/v1/agents/register \
  -H "Content-Type: application/json" \
  -d '{"agent_name": "My SEO Agent", "agent_type": "custom"}'

# 2. Get access token
curl -X POST https://sharksapi.ai/oauth/token \
  -H "Content-Type: application/json" \
  -d '{"grant_type":"client_credentials","client_id":"YOUR_ID","client_secret":"YOUR_SECRET"}'

# 3. Request GSC connection (sends email to account owner)
curl -X POST https://sharksapi.ai/api/v1/agents/{agent_id}/connections/init \
  -H "Authorization: Bearer TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"service": "gsc"}'

# 4. Owner clicks the authorization link in email → authorizes Google access

# 5. Configure site URL
curl -X PUT https://sharksapi.ai/api/v1/agents/{agent_id}/connections/gsc/configure \
  -H "Authorization: Bearer TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"site_url": "https://example.com"}'

# 6. Query GSC data!
curl "https://sharksapi.ai/api/v1/analytics/gsc/top-queries?start_date=2026-03-01&end_date=2026-03-24&limit=10" \
  -H "Authorization: Bearer TOKEN"

Google Search Console (GSC) Endpoints

GET /api/v1/analytics/gsc?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
    → Overview: clicks, impressions, CTR, position

GET /api/v1/analytics/gsc/top-queries?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD&limit=20
    → Top search queries with clicks, impressions, CTR, position

GET /api/v1/analytics/gsc/top-pages?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD&limit=20
    → Top pages with clicks, impressions, CTR, position

Google Analytics 4 (GA4) Endpoints

GET /api/v1/analytics/ga4?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
    → Sessions, users, pageviews, bounce rate, conversions

GET /api/v1/analytics/ga4/channels?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
    → Traffic breakdown by channel (organic, paid, social, direct, etc.)

All Analytics API Endpoints

# Analytics & SEO
GET /api/v1/analytics/summary              Overview of all connected services
GET /api/v1/analytics/ga4                  Google Analytics 4 metrics
GET /api/v1/analytics/ga4/channels         GA4 traffic channels
GET /api/v1/analytics/gsc                  Search Console overview
GET /api/v1/analytics/gsc/top-queries      Top search queries
GET /api/v1/analytics/gsc/top-pages        Top pages
GET /api/v1/analytics/google-ads           Google Ads campaigns
GET /api/v1/analytics/meta-ads             Meta (Facebook/Instagram) Ads
GET /api/v1/analytics/google-business      Google Business Profile
GET /api/v1/analytics/google-tag-manager   GTM containers

# Social Media
GET /api/v1/analytics/facebook             Facebook Page insights
GET /api/v1/analytics/instagram            Instagram insights
GET /api/v1/analytics/linkedin             LinkedIn company page
GET /api/v1/analytics/twitter              Twitter/X analytics
GET /api/v1/analytics/youtube              YouTube channel analytics
GET /api/v1/analytics/tiktok               TikTok analytics

# Sales & CRM
GET /api/v1/sales/summary                  Sales overview
GET /api/v1/sales/pipedrive/deals          Pipedrive deals
GET /api/v1/sales/pipedrive/contacts       Pipedrive contacts
GET /api/v1/sales/pipedrive/organizations  Pipedrive organizations
GET /api/v1/sales/pipedrive/activities     Pipedrive activities
GET /api/v1/sales/merit/invoices           Merit Aktiva invoices
GET /api/v1/sales/merit/customers          Merit Aktiva customers
GET /api/v1/sales/merit/payments           Merit Aktiva payments
GET /api/v1/sales/merit/products           Merit Aktiva products

# ERP & accounting (25+ systems) — via MCP / A2A tools, NOT REST:
#   PandaDoc, SimplBooks, Procountor, Lemonsoft, Dynamics 365,
#   SAP Business One + S/4HANA, Fortnox, e-conomic, SuperOffice,
#   Tripletex, Visma Net, Xero, Sage, QuickBooks, Monitor ERP, Wise...
#   Call via POST /api/v1/a2a (tasks/send) or MCP /mcp/salesbot —
#   tool names like get_fortnox_invoices, get_xero_invoices,
#   get_pandadoc_documents, get_wise_balances.

# Office & Productivity
GET /api/v1/office/calendar/events         Google Calendar events
GET /api/v1/office/emails                  Gmail inbox
POST /api/v1/office/emails/send            Send email via Gmail
GET /api/v1/office/documents               Google Drive files
GET /api/v1/office/notion/databases        Notion databases

# Marketing
POST /api/v1/marketing/email               Schedule marketing email
POST /api/v1/marketing/crawl/search        Web search & crawl
POST /api/v1/marketing/scrape              Scrape any website

# WordPress
GET /api/v1/wordpress/posts                List posts
POST /api/v1/wordpress/posts               Create post
PUT /api/v1/wordpress/posts/{id}           Update post

Run a marketing team (Command Center)

Beyond reading data, an agent can build and run a whole marketing operation on SharksAPI: a manager dashboard (Command Center) with a shared plan, a team of specialist sub-agents, an approvals queue for the human, and an annual calendar. All of it is driven by tools — call them via POST /api/v1/a2a (tasks/send, params.tool) or MCP.

Approvals loop — the human stays in control

Nothing an agent produces ships silently. Content goes into an approvals queue the human reviews on the dashboard; their decision flows back to the agent.

# Agent submits a post / article / newsletter for the owner to approve
POST https://sharksapi.ai/api/v1/a2a   {"method":"tasks/send","params":{"tool":"submit_draft", ...}}

# submit_draft   → queue content for human approval (never auto-publishes)
# list_drafts    → see what is pending / changes_requested
# review_draft   → (human action, from the dashboard) approve · schedule · request changes · reject
# revise_draft   → agent resubmits after "request changes"

The per-channel autonomy level (manual / approve / autopilot) is set by the human on the Command Center and stored as a shared-memory constraint — every agent reads it on memory_bootstrap and obeys.


Shared memory — a team that never forgets

Every agent on a project reads and writes one shared, structured memory: constraints (incl. autonomy + budget limits), decisions, results, lessons, task state and facts. The Ads agent knows what the SEO agent learned; Monday's agent knows what Friday's did.

# FIRST call of every session — returns the composed context (~2500-token budget):
# all global constraints + facts, your channel's open task_state, latest decisions/results/lessons
POST https://sharksapi.ai/api/v1/a2a   {"method":"tasks/send","params":{"tool":"memory_bootstrap"}}

# memory_write   → record a decision/result/lesson/task_state/fact/constraint (dated, measurable)
# memory_search  → look up by query / scope / type
# memory_update  → amend an entry instead of duplicating it
# memory_review  → what is stale / expiring

Roles: channel agents write their own channel + private scope; constraints are orchestrator/human-only. Human owners can also add and rewrite memory straight from the Command Center — no login required.


Skills — downloadable role playbooks

SharksAPI ships 55+ AI skills: step-by-step skill.md playbooks for SEO audits, blog writing, paid-ads optimization, competitor watch, lead qualification and more. Install the ones matching your role and they load every session.

GET  https://sharksapi.ai/api/v1/a2a/skills        # full catalog (role playbooks + skill.md URLs)
GET  https://sharksapi.ai/skills/command-center-agent.skill.md   # fetch one; save as .claude/skills/{name}/SKILL.md

# check_skill_updates → compare your installed skills against the catalog and report
#                       which are current / stale (each skill is version-stamped)

When you create or link a team agent, the response includes recommended_skills for that role — install those first.


Machine-Readable Discovery

AI agents can auto-discover this platform via standard protocols:

Verify us first — Signed Agent Card

Our Agent Card is a detached JWS (ES256): the signatures field lets you cryptographically confirm this platform is who it claims to be before you send anything. Fetch agent-card.json, verify the signature against the public keys at jwks.json (JCS canonicalization, RFC 8785). protocolVersion: 1.0, preferredTransport: JSONRPC.

A2A Protocol Endpoints

POST https://sharksapi.ai/a2a                 # Google A2A v1.0 — natural language (message/send) + tasks/get
POST https://sharksapi.ai/api/v1/a2a          # direct tool call (JSON-RPC tasks/send, params.tool)
GET  https://sharksapi.ai/api/v1/a2a/skills   # tool + skill catalog (role playbooks, skill.md files)
GET  https://sharksapi.ai/llms.txt            # machine-readable onboarding index
GET  https://sharksapi.ai/api/openapi.json    # full OpenAPI spec

Note: agent OAuth tokens work on /a2a and /api/v1/a2a, not on /mcp. Use A2A for autonomous agent-to-agent calls; MCP (/mcp/{botType}) is for interactive clients like Claude Desktop.

Resources

Monitor Platform Updates Automatically

Set up a cron job to check for new APIs and features:

curl https://sharksapi.ai/api/v1/agents/feed

Feed includes:

Ready to start?

POST to https://sharksapi.ai/api/v1/agents/register with your agent details!


About

Sharksapi.AI is an AI-first API platform with 131+ integrations and 550+ MCP tools. Specialising in European & Nordic business APIs you won't find elsewhere.