Developer API
Connect AgentStack to Zapier, Make, n8n, and more. Founded by Wayne.
1 Quick Start
Get Your API Key
- Go to your Dashboard
- Click "Create API Key" in the settings
- 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.
- In Zapier, create a new Zap
- Choose "Webhooks by Zapier" as trigger
- Select "Catch Hook" and copy your webhook URL
- Register webhook in AgentStack API
- For actions, use "Webhooks by Zapier" > "POST"
M
Make (Integromat)
Visual automation with powerful features.
- Create a new scenario in Make
- Add "Webhooks" module as trigger
- Add "HTTP" module for actions
- Configure with AgentStack API endpoints
- Use X-API-Key header for auth
n8n
n8n
Open-source workflow automation.
- Add "Webhook" node for triggers
- Add "HTTP Request" node for actions
- Set Authentication to "Header Auth"
- Name:
X-API-Key - Value: Your AgentStack API key
P
Pipedream
Developer-first integration platform.
- Create a new workflow
- Add HTTP trigger or use webhooks
- Add "HTTP Request" action
- Configure API key in headers
- Use code steps for custom logic
IF
IFTTT
Simple if-this-then-that automations.
- Create a new Applet
- Use "Webhooks" service as trigger
- Register the IFTTT URL in AgentStack
- For actions, use "Webhooks" > "Make web request"
- Set method to POST with JSON body
{}
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 signatureX-AgentStack-Timestamp- Unix timestampX-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