POST /api/webhooks/add Bearer

Create Webhook Slot

Create a new inbound webhook slot with an auto-generated secret for authenticating incoming payloads. Webhooks forward external data to the PocketPaw agent for processing.

Overview

Creates a new inbound webhook slot. A unique secret is auto-generated for signature verification. The webhook URL follows the pattern /webhook/inbound/{name}.

Request Body

Body Parameters

name required
string

Webhook slug name (used in the URL). Must be URL-safe.

description
string

Human-readable description of what this webhook receives.

Response

status string
"ok" on success
webhook object
name string
Webhook name
secret string
Auto-generated verification secret
description string
Webhook description
Terminal window
curl -X POST "http://localhost:8000/api/webhooks/add" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"name": "github-events", "description": "GitHub repository webhooks"}'
const response = await fetch("http://localhost:8000/api/webhooks/add", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "github-events",
description: "GitHub repository webhooks"
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"http://localhost:8000/api/webhooks/add",
headers={"Authorization": "Bearer <token>"},
json={
"name": "github-events",
"description": "GitHub repository webhooks"
}
)
print(response.json())
{
"status": "ok",
"webhook": {
"name": "github-events",
"secret": "whsec_a1b2c3d4e5f6...",
"description": "GitHub repository webhooks"
}
}
Request
curl -X POST "http://localhost:8000/api/webhooks/add" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>"
const response = await fetch("http://localhost:8000/api/webhooks/add", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
},
});

const data = await response.json();
console.log(data);
import requests

response = requests.post(
    "http://localhost:8000/api/webhooks/add",
    headers={'Content-Type':'application/json','Authorization':'Bearer <token>'},
)

print(response.json())
package main

import (
    "fmt"
    "net/http"
    "io"
)

func main() {
    req, _ := http.NewRequest("POST", "http://localhost:8000/api/webhooks/add", nil)
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer <token>")

    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
Response
Send a request to see the response