Developer API

Connect AgentStack to Zapier, Make, n8n, and more. Founded by Wayne.

1 Quick Start

Get Your API Key

  1. Go to your Dashboard
  2. Click "Create API Key" in the settings
  3. Copy and store your key securely (shown only once)

Test Your Key

curl -H "X-API-Key: your_api_key" \
  https://agentstack.polsia.app/api/v1/workflows

2 Authentication

Include your API key in the X-API-Key header:

X-API-Key: as_live_xxxxxxxxxxxxxxxxxxxx

3 API Endpoints

Workflows

GET /api/v1/workflows

List all your workflows

Show Response
{
  "workflows": [
    {
      "id": 1,
      "name": "Email Responder",
      "description": "Auto-respond to emails",
      "is_deployed": true,
      "created_at": "2024-01-15T10:00:00Z"
    }
  ]
}
POST /api/v1/workflows

Create a new workflow

Show Request/Response
// Request
{
  "name": "My Workflow",
  "description": "Does something cool",
  "system_prompt": "You are a helpful assistant..."
}

// Response
{
  "workflow": {
    "id": 2,
    "name": "My Workflow",
    "description": "Does something cool",
    "created_at": "2024-01-15T10:00:00Z"
  }
}
POST /api/v1/workflows/:id/run

Run a workflow with input data

Show Request/Response
// Request
{
  "input": {
    "message": "Hello, analyze this data...",
    "data": { "key": "value" }
  }
}

// Response
{
  "execution_id": 123,
  "status": "completed",
  "output": {
    "result": "Analysis complete...",
    "confidence": 0.95
  }
}

Executions

GET /api/v1/executions

List recent executions. Query params: workflow_id, status, limit

GET /api/v1/executions/:id

Get execution details including input, output, and status

Webhooks (Triggers)

POST /api/v1/webhooks

Register a webhook URL to receive events

Show Request/Response
// Request
{
  "name": "My Zapier Trigger",
  "url": "https://hooks.zapier.com/...",
  "event_types": ["execution.completed"]
}

// Response
{
  "webhook": { "id": 1, "name": "My Zapier Trigger", ... },
  "secret": "xxx...xxx",
  "message": "Store this secret to verify webhook signatures."
}

Available Events

workflow.created workflow.deployed workflow.deleted execution.started execution.completed execution.failed

4 Integration Platforms

Z

Zapier

Connect AgentStack to 5,000+ apps.

  1. In Zapier, create a new Zap
  2. Choose "Webhooks by Zapier" as trigger
  3. Select "Catch Hook" and copy your webhook URL
  4. Register webhook in AgentStack API
  5. For actions, use "Webhooks by Zapier" > "POST"
Zapier integration coming soon →
M

Make (Integromat)

Visual automation with powerful features.

  1. Create a new scenario in Make
  2. Add "Webhooks" module as trigger
  3. Add "HTTP" module for actions
  4. Configure with AgentStack API endpoints
  5. Use X-API-Key header for auth
Build with Make →
n8n

n8n

Open-source workflow automation.

  1. Add "Webhook" node for triggers
  2. Add "HTTP Request" node for actions
  3. Set Authentication to "Header Auth"
  4. Name: X-API-Key
  5. Value: Your AgentStack API key
Self-host n8n →
P

Pipedream

Developer-first integration platform.

  1. Create a new workflow
  2. Add HTTP trigger or use webhooks
  3. Add "HTTP Request" action
  4. Configure API key in headers
  5. Use code steps for custom logic
Try Pipedream free →
IF

IFTTT

Simple if-this-then-that automations.

  1. Create a new Applet
  2. Use "Webhooks" service as trigger
  3. Register the IFTTT URL in AgentStack
  4. For actions, use "Webhooks" > "Make web request"
  5. Set method to POST with JSON body
IFTTT Webhooks →
{}

Custom Integration

Build your own integration with our REST API.

// Run a workflow
const response = await fetch(
  'https://agentstack.polsia.app/api/v1/workflows/1/run',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-Key': 'as_live_xxx'
    },
    body: JSON.stringify({
      input: { message: 'Hello!' }
    })
  }
);

5 Webhook Signature Verification

All webhooks include a signature for verification:

  • X-AgentStack-Signature - HMAC-SHA256 signature
  • X-AgentStack-Timestamp - Unix timestamp
  • X-AgentStack-Event - Event type
// Verify webhook signature (Node.js)
const crypto = require('crypto');

function verifyWebhook(body, signature, timestamp, secret) {
  const expectedSig = crypto
    .createHmac('sha256', secret)
    .update(`${timestamp}.${body}`)
    .digest('hex');

  return signature === expectedSig;
}

Rate Limits

Plan API Requests Webhook Events
Starter 1,000/day 100/day
Pro 10,000/day 1,000/day
Agency Unlimited Unlimited

Need Help?

Contact Wayne, the founder, for integration support.

Email Support