← Documentation home

Programmatic API Quickstart

Use the DripPulse HTTP API from scripts, backends, or CI. All examples use curl; any HTTP client works the same way.

Base URL: https://drippulse.io
API prefix: /api/v1
Auth header: Authorization: Bearer <token>

1. Authentication

You can authenticate with either:

For admin / fixture scripts only, you can obtain a JWT with:

curl -s -X POST "https://drippulse.io/api/v1/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"username":"YOUR_ADMIN_USER","password":"YOUR_ADMIN_PASS"}'

Use the returned token as Bearer for subsequent requests. Rotate passwords and never commit tokens.

2. Environment variables

export API_BASE="https://drippulse.io"
export TOKEN="adcrm_live_your_key_here"

3. Workflows

List workflows

curl -s "$API_BASE/api/v1/workflows" \
  -H "Authorization: Bearer $TOKEN"

Create a workflow

You may send a top-level JSON body or wrap fields in workflow. Minimal example:

curl -s -X POST "$API_BASE/api/v1/workflows" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My API workflow",
    "description": "Created via API",
    "status": "draft",
    "steps": [
      {"type":"trigger","name":"Start","config":{"frequency":"hourly"}},
      {"type":"log","name":"Done","config":{"message":"ok","level":"info"}}
    ],
    "integrations": []
  }'

Test a workflow (dry run)

Optional body keys: sample_data, input, or runtime_payload (merged into the test run).

curl -s -X POST "$API_BASE/api/v1/workflows/WORKFLOW_ID/test" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sample_data":{"email":"demo@example.com"}}'

4. Agents

Deploy from a template

curl -s -X POST "$API_BASE/api/v1/agents/spawn" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Lead scorer from API",
    "type": "template",
    "template_id": TEMPLATE_ID,
    "configuration": { "min_score_threshold": 0.75 }
  }'

Some clients send a nested agent object; the API accepts that shape as well. Response includes id / agent_id.

Deploy from a workflow

curl -s -X POST "$API_BASE/api/v1/agents/spawn" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Workflow runner",
    "type": "workflow",
    "workflow_id": WORKFLOW_ID
  }'

Execute an agent

Send your payload as input or as a JSON object (reserved keys are stripped). Response includes parsed and output where applicable.

curl -s -X POST "$API_BASE/api/v1/agents/AGENT_ID/execute" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"input":{"company":"Acme","industry":"SaaS"}}'

Template inference (structured JSON)

curl -s -X POST "$API_BASE/api/v1/agents/AGENT_ID/inference" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"input":{"company":"Acme"},"required_keys":["score","reasoning"]}'

Agent metrics

curl -s "$API_BASE/api/v1/agents/AGENT_ID/metrics" \
  -H "Authorization: Bearer $TOKEN"

Includes execution counts, cost aliases, success rate, and average response time when executions have started_at / ended_at.

5. Common JSON patterns

AreaNotes
Content-TypeUse application/json for POST/PATCH bodies.
Errors4xx/5xx return JSON with error or message; read the body for details.
IdempotencySome agent calls accept idempotency_key in the body.
Org scopeAPI keys are scoped to one organization; you only see that org’s data.

6. Next steps

DripPulse · drippulse.io