Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.topify.ai/llms.txt

Use this file to discover all available pages before exploring further.

Actions are AI-generated recommendations for improving your brand’s visibility in AI search results. There are four action categories: on_page_seo (advisory SEO changes), new_content (new articles with full write workflow), content_update (page edit suggestions), and forum_engagement (Reddit reply drafts).

List actions

GET /projects/{project_id}/actions
Returns all actions for a project, optionally filtered by status or group.

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID

Query parameters

ParamTypeDefaultDescription
statusstringFilter by status (suggested, accepted, in_progress, completed, ignored)
groupstringFilter by group name
curl "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/actions?status=suggested" \
  -H "X-API-Key: tk_live_..."

Response

{
  "success": true,
  "data": [
    {
      "id": "a1b2c3d4-...",
      "priority": "high",
      "title": "Add structured data to pricing page",
      "description": "Adding FAQ schema markup to your pricing page will help AI models extract and cite your pricing details.",
      "category": "on_page_seo",
      "effort": "quick-win",
      "expected_impact_min": 5,
      "expected_impact_max": 15,
      "status": "suggested",
      "targets": [
        { "type": "url", "value": "https://example.com/pricing" }
      ],
      "execution": {
        "type": "manual",
        "prompt": null,
        "skill": null,
        "params": null
      },
      "group": "Technical SEO",
      "depends_on": [],
      "created_at": "2026-04-01T12:00:00Z",
      "updated_at": "2026-04-01T12:00:00Z"
    }
  ]
}

ActionItem fields

FieldTypeNullableDescription
idstring (UUID)NoAction ID
prioritystringNocritical, high, medium, or low
titlestringNoShort action title
descriptionstringNoDetailed explanation of the recommendation
categorystringNoon_page_seo, new_content, content_update, or forum_engagement
effortstringYesquick-win, moderate, or major
expected_impact_minnumberYesMinimum estimated visibility impact (percentage points)
expected_impact_maxnumberYesMaximum estimated visibility impact (percentage points)
statusstringNosuggested, accepted, in_progress, completed, or ignored
targetsobject[]NoArray of targets (see below)
executionobjectNoExecution configuration (see below)
groupstringYesLogical grouping name
depends_onstring[]NoIDs of actions this action depends on
created_atstringNoISO 8601 timestamp
updated_atstringNoISO 8601 timestamp

Target object

FieldTypeDescription
typestringurl, keyword, page_type, or domain
valuestringThe target value

Execution object

FieldTypeNullableDescription
typestringNoprompt, publishable_content, forum_reply, or manual
promptstringYesLLM prompt used for execution
skillstringYesAgent skill identifier
paramsobjectYesAdditional execution parameters

Get single action

GET /projects/{project_id}/actions/{action_id}
Returns a single action by ID.

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID
action_idstring (UUID)The action ID
curl "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/actions/{action_id}" \
  -H "X-API-Key: tk_live_..."

Response

{
  "success": true,
  "data": {
    "id": "a1b2c3d4-...",
    "priority": "high",
    "title": "Add structured data to pricing page",
    "description": "Adding FAQ schema markup to your pricing page will help AI models extract and cite your pricing details.",
    "category": "on_page_seo",
    "effort": "quick-win",
    "expected_impact_min": 5,
    "expected_impact_max": 15,
    "status": "suggested",
    "targets": [
      { "type": "url", "value": "https://example.com/pricing" }
    ],
    "execution": {
      "type": "manual",
      "prompt": null,
      "skill": null,
      "params": null
    },
    "group": "Technical SEO",
    "depends_on": [],
    "created_at": "2026-04-01T12:00:00Z",
    "updated_at": "2026-04-01T12:00:00Z"
  }
}

Error responses

StatusCause
404Action not found in this project

Create action

POST /projects/{project_id}/actions
Create a new action manually.

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID

Request body

FieldTypeRequiredDescription
titlestringYesShort action title
descriptionstringYesDetailed explanation
categorystringYeson_page_seo, new_content, content_update, or forum_engagement
prioritystringYescritical, high, medium, or low
executionobjectYes{type, prompt?, skill?}
targetsobject[]NoArray of {type, value} targets
effortstringNoquick-win, moderate, or major
expected_impact_minnumberNoMinimum estimated impact
expected_impact_maxnumberNoMaximum estimated impact
curl -X POST "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/actions" \
  -H "X-API-Key: tk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Write a comparison article",
    "description": "Create an article comparing your product with top competitors for the keyword \"best project management tools\".",
    "category": "new_content",
    "priority": "high",
    "execution": {"type": "publishable_content", "skill": "write_article"},
    "targets": [{"type": "keyword", "value": "best project management tools"}],
    "effort": "major",
    "expected_impact_min": 10,
    "expected_impact_max": 25
  }'

Response

Returns the created action (same shape as get single action) with status suggested.

Error responses

StatusCause
400Missing required fields or invalid category/priority/execution type
403API key has read-only access

Enrich action

POST /projects/{project_id}/actions/enrich
Sends partial action data to the LLM and returns enriched fields (improved title, description, targets, execution config).

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID

Request body

FieldTypeRequiredDescription
action_typestringYeson_page_seo, new_content, content_update, or forum_engagement
titlestringNoDraft title
descriptionstringNoDraft description
target_urlstringNoTarget URL for the action
keywordsstring[]NoRelated keywords
instructionsstringNoFree-form instructions for the LLM
curl -X POST "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/actions/enrich" \
  -H "X-API-Key: tk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "action_type": "new_content",
    "title": "Comparison article",
    "keywords": ["best project management tools"]
  }'

Response

Returns LLM-enriched action fields (title, description, targets, execution, effort, expected impact).

Error responses

StatusCause
400Missing action_type or invalid value

Transition status

PATCH /projects/{project_id}/actions/{action_id}/{action}
Transition an action to a new status. The action path parameter determines the transition.

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID
action_idstring (UUID)The action ID
actionstringOne of: accept, start, complete, ignore, reopen

Request body (ignore only)

FieldTypeRequiredDescription
reasonstringNoReason for ignoring
feedbackstringNoAdditional feedback

State machine

suggested --> accepted --> in_progress --> completed
    |                                        ^
    +--> ignored ---(reopen)---> accepted ---+
curl -X PATCH "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/actions/{action_id}/accept" \
  -H "X-API-Key: tk_live_..."

Response

Returns the updated action with the new status.

Error responses

StatusCause
400Invalid transition (e.g., completing a suggested action)
403API key has read-only access
404Action not found

Batch transition

POST /projects/{project_id}/actions/batch-transition
Transition multiple actions at once.

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID

Request body

FieldTypeRequiredDescription
idsstring[]YesArray of action IDs
actionstringYesaccept, start, complete, ignore, or reopen
curl -X POST "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/actions/batch-transition" \
  -H "X-API-Key: tk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "ids": ["a1b2c3d4-...", "e5f6g7h8-..."],
    "action": "accept"
  }'

Response

{
  "success": true,
  "data": {
    "succeeded": 2,
    "failed": 0,
    "total": 2
  }
}

Error responses

StatusCause
400Empty ids array or invalid action
403API key has read-only access

Recommend actions

POST /projects/{project_id}/actions/recommend
Triggers AI-powered action recommendation generation as a background task. The AI analyzes your project data and generates a set of recommended actions.

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID
curl -X POST "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/actions/recommend" \
  -H "X-API-Key: tk_live_..."

Response

{
  "success": true,
  "data": {
    "task_id": "f1e2d3c4-..."
  }
}
Use the check recommendation task status endpoint to poll for completion.

Check recommendation task status

GET /projects/{project_id}/actions/tasks/{task_id}
Check the status of a background recommendation task.

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID
task_idstring (UUID)The task ID returned by the recommend endpoint
curl "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/actions/tasks/{task_id}" \
  -H "X-API-Key: tk_live_..."

Response

{
  "success": true,
  "data": {
    "status": "completed",
    "item_count": 12,
    "error": null
  }
}

Task status values

StatusDescription
runningTask is still in progress
completedRecommendations generated successfully
failedTask encountered an error (see error field)

Enrich content

POST /projects/{project_id}/actions/{action_id}/enrich-content
For content_update actions. Scrapes the target page via Firecrawl, then generates SEO edit suggestions via LLM. Returns an array of specific edits to improve AI visibility.
This endpoint may take 10—20 seconds to respond as it scrapes and analyzes the target page.

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID
action_idstring (UUID)The action ID (must be a content_update action)
curl -X POST "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/actions/{action_id}/enrich-content" \
  -H "X-API-Key: tk_live_..."

Response

{
  "success": true,
  "data": [
    {
      "section": "Introduction paragraph",
      "type": "replace",
      "before": "We offer project management software.",
      "after": "We offer AI-powered project management software trusted by 10,000+ teams worldwide.",
      "signal": "authority",
      "reason": "Adding specificity and social proof helps AI models identify your brand as a credible source."
    },
    {
      "section": "FAQ section",
      "type": "insert",
      "before": null,
      "after": "<h2>Frequently Asked Questions</h2>...",
      "signal": "structured_data",
      "reason": "FAQ sections are heavily cited by AI models when answering user questions."
    }
  ]
}

Edit object fields

FieldTypeNullableDescription
sectionstringNoThe page section being edited
typestringNoreplace, insert, or delete
beforestringYesOriginal text (null for insert)
afterstringYesReplacement text (null for delete)
signalstringNoThe SEO/GEO signal being addressed
reasonstringNoExplanation of why this edit improves visibility

Error responses

StatusCause
400Action is not a content_update action or has no target URL
404Action not found

Enrich forum

POST /projects/{project_id}/actions/{action_id}/enrich-forum
For forum_engagement actions. Regenerates a Reddit comment draft tailored to the target thread.

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID
action_idstring (UUID)The action ID (must be a forum_engagement action)
curl -X POST "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/actions/{action_id}/enrich-forum" \
  -H "X-API-Key: tk_live_..."

Response

{
  "success": true,
  "data": {
    "comment": "I've been using Acme for about six months now and it's been solid for our team...",
    "comment_word_count": 87,
    "thread_title": "What project management tool do you use?",
    "thread_url": "https://www.reddit.com/r/productivity/comments/..."
  }
}

Error responses

StatusCause
400Action is not a forum_engagement action
404Action not found

Execute action

POST /projects/{project_id}/actions/{action_id}/execute
Starts the execution workflow for a new_content action with publishable_content execution type. This triggers article generation with human-in-the-loop approval checkpoints (outline, draft, final). Progress is delivered via webhooks.
Only works for actions with execution.type: "publishable_content". You must have a webhook registered for action.checkpoint events to receive approval prompts.

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID
action_idstring (UUID)The action ID
curl -X POST "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/actions/{action_id}/execute" \
  -H "X-API-Key: tk_live_..."

Response (202 Accepted)

{
  "success": true,
  "data": {
    "workflow_id": "w1x2y3z4-...",
    "status": "started"
  }
}

Error responses

StatusCause
400Action is not a publishable_content type or is not in accepted/in_progress status
404Action not found

Respond to checkpoint

POST /projects/{project_id}/actions/{action_id}/execute/respond
Respond to an approval checkpoint in an active execution workflow. Called after receiving an action.checkpoint webhook event.

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID
action_idstring (UUID)The action ID

Request body

FieldTypeRequiredDescription
workflow_idstring (UUID)YesThe workflow ID from the checkpoint event
decisionstringYesapprove, edit, regenerate, or reject
edited_contentstringNoModified content (required when decision is edit)
feedbackstringNoInstructions for regeneration (used when decision is regenerate)
curl -X POST "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/actions/{action_id}/execute/respond" \
  -H "X-API-Key: tk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "workflow_id": "w1x2y3z4-...",
    "decision": "approve"
  }'

Response

{
  "success": true,
  "data": {
    "status": "continuing"
  }
}

Error responses

StatusCause
400Invalid decision, missing workflow_id, or edited_content required but not provided
404Action or workflow not found
409Workflow is not currently waiting at a checkpoint