API
Running actions
POST to generate content, run audits and trigger platform work.
Request
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"
}'{
"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
| Field | Required | Description |
|---|---|---|
action | Yes | One of the actions below |
client_id | Yes | The client the action runs against |
| action-specific fields | Varies | See the required/optional columns per action below |
Response shape
| Field | Type | Description |
|---|---|---|
action | string | Echoes the action you requested |
client_id | string | Echoes the client the action ran against |
status | "success" | "error" | Outcome of the underlying work, separate from HTTP status |
status_code | number | HTTP-style status of the underlying integration or generator |
data | object | The created or updated record; shape depends on the action |
Available actions
| Action | Required fields | Optional fields | Does |
|---|---|---|---|
seo_audit | url | - | Runs a site audit |
optimize_page | url | keyword | Generates on-page optimisations for a URL |
generate_keywords | - | seed, location | Generates keyword ideas with live metrics |
generate_topical_map | topic | depth | Builds a topical map |
generate_blog | keyword | category_id, tone | Drafts a blog article |
generate_blog_image | title | style | Generates a featured image |
generate_geo_article | keyword, city, state | category_id | Drafts a geo-targeted article |
generate_press_release | headline | body_points | Drafts a press release |
generate_gbp_post | topic | cta | Drafts a Business Profile post |
deploy_blog | - | post_id | Deploys the blog widget |
index_url | url | - | Submits a URL for indexing |
fetch_backlinks | - | - | Refreshes the backlink profile |
generate_outreach_email | prospectUrl | tone | Drafts an outreach email |
send_prospect_email | to, subject, html | - | Sends a prospect email |
run_grid_search | keyword, lat, lng | radius | Runs a local grid search |
run_llm_visibility | prompt, brand_name | competitors | Runs an answer-engine visibility check |
score_call | transcript | call_id | Scores a call transcript |
Example responses
{
"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.