Quick Start in 3 Steps

  1. Start the API server: openclaw start --api
  2. Send your first request: curl -X POST http://localhost:8080/api/run -H "Content-Type: application/json" -d '{"task": "Hello world"}'
  3. Process the result: Pipe the JSON response to your app or webhook endpoint
💡
For local development, use ngrok to expose your webhook endpoint: ngrok http 8080

Prerequisites

  • OpenClaw v1.0.0 or later installed and running
  • For REST API: OpenClaw started with openclaw start --api
  • For Python plugins: Python 3.9+ and basic Python knowledge
  • For webhooks: a publicly accessible server URL (or ngrok for local dev)

REST API

When running openclaw start --api, a REST API is available at http://localhost:8080:

# Run a task via API
curl -X POST http://localhost:8080/api/run \
  -H "Content-Type: application/json" \
  -d '{"task": "Summarize this text", "provider": "openai"}'

# Check job status
curl http://localhost:8080/api/status/JOB_ID

# List all jobs
curl http://localhost:8080/api/jobs

Webhooks

Configure webhooks to POST job results to any URL when a task completes:

# config.yaml
webhooks:
  on_complete:
    url: https://your-app.com/hooks/openclaw
    method: POST
    headers:
      Authorization: "Bearer YOUR_WEBHOOK_SECRET"
    payload_template: |
      {
        "job_id": "{{ job.id }}",
        "status": "{{ job.status }}",
        "result": "{{ job.result }}"
      }

Python Tool Plugin API

Create custom tools in Python that the agent can invoke:

from openclaw.tools import tool, ToolResult

@tool(name="weather", description="Get current weather for a city")
def get_weather(city: str) -> ToolResult:
    """Fetch weather data for the specified city."""
    import requests
    resp = requests.get(f"https://wttr.in/{city}?format=3")
    return ToolResult(success=True, data=resp.text)
# Register the plugin
openclaw install ./my_weather_tool.py

# Test it
openclaw run "What's the weather in London?" --enable-tools weather

Community Packs

PackToolsInstall
browserWeb search, page fetch, screenshotopenclaw install browser
databaseSQLite, PostgreSQL queriesopenclaw install database
gitCommit, diff, branch managementopenclaw install git
emailSend/read via SMTP/IMAPopenclaw install email
filesystemRead, write, list, delete filesopenclaw install filesystem
⚠️
Community Pack Security

Community packs are third-party. Review the source code before installing. Always use allowed_tools in config to limit what tools the agent can access.

Slack Integration

Post AI-generated messages and reports directly to Slack channels using the Incoming Webhooks feature or the Slack community pack:

# Install the Slack pack
openclaw install slack
openclaw config set slack.webhook_url "https://hooks.slack.com/services/T.../B.../..."

# Post an AI-generated message to Slack
openclaw run "Summarize today's deployment and any issues" | \
  openclaw slack post --channel "#deployments"

# Or use direct webhook (no pack required)
SUMMARY=$(openclaw run "Summarize the last 10 git commits")
curl -s -X POST "$SLACK_WEBHOOK_URL" \
  -H 'Content-type: application/json' \
  --data "{\"text\": \"$SUMMARY\"}"

Notion and Confluence Integration

Populate Notion databases or Confluence pages with AI-generated content:

# Install Notion pack
openclaw install notion
openclaw config set notion.api_key "secret_..."
openclaw config set notion.database_id "YOUR_DATABASE_ID"

# Create a new Notion page from meeting notes
openclaw run "Convert these meeting notes into a structured Notion page with sections: Summary, Decisions, Action Items, Next Meeting" \
  --file meeting-notes.txt \
  --output notion-page.json
openclaw notion create-page --from notion-page.json

GitHub Integration

Combine OpenClaw with the GitHub CLI for AI-powered repository management:

# Auto-generate PR descriptions
git diff main...HEAD | \
  openclaw run "Write a GitHub pull request description with: Summary, Changes Made, Testing Done, Breaking Changes." | \
  gh pr create --body-file -

# Triage open issues
gh issue list --json title,body,number | \
  openclaw run "Classify each issue as: bug / feature / docs. Add priority: high / medium / low. Output JSON." | \
  jq -r '.[] | "Issue #\(.number): \(.label) (\(.priority))"'

# Generate commit messages
git diff --staged | openclaw run "Write a conventional commit message for these changes (type: feat/fix/docs/refactor)."

Try It Yourself

These examples show how to connect OpenClaw to common developer tools using the REST API and webhooks.

Example 1: Call the REST API from any language

# Trigger a task via curl (useful from CI/CD, scripts, or other services)
curl -X POST https://your-openclaw-instance/api/run \
  -H "Authorization: Bearer $OPENCLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"task": "Summarise this week'"'"'s git commits in one paragraph", "model": "gpt-4o-mini"}'

# Response:
# {"status": "completed", "output": "This week the team shipped...", "tokens_used": 312}

Example 2: Trigger OpenClaw from a GitHub Actions workflow

# .github/workflows/ai-review.yml
name: AI Code Review
on: [pull_request]
jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - run: pip install openclaw
      - name: Review PR diff
        env:
          OPENCLAW_API_KEY: ${{ secrets.OPENCLAW_API_KEY }}
        run: |
          git diff origin/${{ github.base_ref }}...HEAD > diff.patch
          openclaw run "Review this PR diff: flag bugs, security issues, missing tests. Be concise." \
            --file diff.patch --format markdown > review.md
          cat review.md

Example 3: Webhook — trigger a task from any external service

# Configure a webhook receiver in openclaw config.yaml:
# webhook:
#   enabled: true
#   port: 8080
#   secret: "${WEBHOOK_SECRET}"

# Then send a POST from Zapier, Make.com, Stripe, or any service:
curl -X POST http://localhost:8080/webhook \
  -H "X-Signature: $WEBHOOK_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"task": "New Stripe payment received. Update the monthly revenue spreadsheet."}'
Zapier / Make.com setup: Use the "Webhooks" module in Zapier or Make.com and point it at your OpenClaw webhook endpoint. This lets you trigger AI tasks from 5000+ apps — including Gmail, Google Sheets, Notion, and Slack — with no code.

What's Next