API

API overview

One authenticated endpoint that reads every Aisoiq dataset and triggers every platform action for your clients.

The platform API is a single gateway. GET reads data; POST runs actions. Everything is scoped to one client at a time, and every request is authenticated with an agency API key.

Base URL

Your exact base URL is shown in the app under Agency → Automations → API, next to your keys. Copy it from there, the examples below use it as an environment variable.

Set up your shell
export AISOIQ_API_BASE="<copy from Agency → Automations → API>"
export AISOIQ_API_KEY="<your API key>"

Discovery

A GET with no parameters returns every readable resource and every available action with its required fields. Use it as the live source of truth, it always matches your deployment.

bash
curl -s "$AISOIQ_API_BASE" \
  -H "Authorization: Bearer $AISOIQ_API_KEY"
Response (truncated)
{
  "resources": ["clients", "backlinks", "keywords", "blogs", "seo_tasks", "..."],
  "actions": [
    { "action": "seo_audit", "description": "Run SEO audit", "required_fields": ["url"] },
    { "action": "generate_blog", "description": "AI-generate a blog article", "required_fields": ["keyword"] }
  ]
}

Shape of every call

MethodPurposeRequired
GETRead a datasetresource, plus client_id for everything except clients
POSTRun an actionaction and client_id in the JSON body, plus that action's fields

Top-level response fields

FieldPresent onDescription
resource / actionGET / POSTEchoes the resource or action you requested
client_idBoth (except clients)Echoes the client the response is scoped to
dataBothArray of rows for GET, or the created/updated object for POST
paginationGET (list resources){ total, limit, offset, has_more }
status / status_codePOSTOutcome of the underlying action, independent of the HTTP status
errorAny 4xx/5xxHuman-readable, actionable message

Start with the client list

GET ?resource=clients returns the client IDs your key can reach. Every other call needs one of those IDs.

Try it without a key

The [API explorer](api/explorer) runs every read and every action against built-in sample data, so you can see the exact response shape before you create a key, then copy the request as cURL, JavaScript or Python.

Was this page helpful?