API

Running actions

POST to generate content, run audits and trigger platform work.

Request

bash
curl -s -X POST "$AGENTIX_API_BASE" \
  -H "Authorization: Bearer $AGENTIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "generate_blog",
    "client_id": "'"$CLIENT_ID"'",
    "keyword": "tankless water heater repair austin"
  }'
Response
{
  "action": "generate_blog",
  "client_id": "uuid-123",
  "status": "success",
  "status_code": 200,
  "data": { "id": "blog-9f2", "post_title": "Tankless Water Heater Repair in Austin" }
}

Request shape

FieldRequiredDescription
actionYesOne of the actions below
client_idYesThe client the action runs against
action-specific fieldsVariesSee the required/optional columns per action below

Response shape

FieldTypeDescription
actionstringEchoes the action you requested
client_idstringEchoes the client the action ran against
status"success" | "error"Outcome of the underlying work, separate from HTTP status
status_codenumberHTTP-style status of the underlying integration or generator
dataobjectThe created or updated record; shape depends on the action

Available actions

ActionRequired fieldsOptional fieldsDoes
seo_auditurl-Runs a site audit
optimize_pageurlkeywordGenerates on-page optimisations for a URL
generate_keywords-seed, locationGenerates keyword ideas with live metrics
generate_topical_maptopicdepthBuilds a topical map
generate_blogkeywordcategory_id, toneDrafts a blog article
generate_blog_imagetitlestyleGenerates a featured image
generate_geo_articlekeyword, city, statecategory_idDrafts a geo-targeted article
generate_press_releaseheadlinebody_pointsDrafts a press release
generate_gbp_posttopicctaDrafts a Business Profile post
deploy_blog-post_idDeploys the blog widget
index_urlurl-Submits a URL for indexing
fetch_backlinks--Refreshes the backlink profile
generate_outreach_emailprospectUrltoneDrafts an outreach email
send_prospect_emailto, subject, html-Sends a prospect email
run_grid_searchkeyword, lat, lngradiusRuns a local grid search
run_llm_visibilityprompt, brand_namecompetitorsRuns an answer-engine visibility check
score_calltranscriptcall_idScores a call transcript

Example responses

json
{
  "action": "seo_audit",
  "client_id": "uuid-123",
  "status": "success",
  "status_code": 200,
  "data": { "id": "report-77a", "score": 82, "issues_found": 14, "url": "https://acmeplumbing.com" }
}

Actions consume real resources

Generation actions spend AI and data credits and can publish or deploy where a client has auto-deploy enabled. Test against one client before wiring a loop.

Idempotency

Actions are not automatically deduplicated, calling generate_blog twice with the same keyword drafts two articles and spends credits twice. There is no server-side idempotency key, so build your own: record the data.id you get back and check for an existing draft with that keyword or prospectUrl before firing the action again. For actions that only read or refresh (fetch_backlinks, seo_audit), re-running is safe since they do not create duplicate records.

Always confirm the exact action list from the discovery call rather than hardcoding this table, new actions appear there first.

Was this page helpful?