Skip to content

Quick Start

Get your first webhook delivered in under 5 minutes.

1. Create an Account

Sign up at promptjang.net (coming soon). You'll receive an organization ID and API key.

2. Create an Endpoint

bash
curl -X POST https://api.promptjang.net/api/v1/endpoints \
  -H "Authorization: Bearer pj_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/webhooks",
    "description": "My first endpoint",
    "event_types": ["order.created", "order.updated"]
  }'

Response:

json
{
  "id": "abc123...",
  "url": "https://example.com/webhooks",
  "secret": "whsec_...",
  "description": "My first endpoint",
  "event_types": ["order.created", "order.updated"],
  "enabled": true,
  "created_at": "2026-05-26T12:00:00Z"
}

Save the secret — you'll need it to sign events.

3. Send an Event

Events are sent to POST /e/:endpoint_id with an HMAC-SHA256 signature:

bash
# Generate signature
PAYLOAD='{"event":"order.created","data":{"order_id":"ORD-001"}}'
TIMESTAMP=$(date +%s)
SIGNATURE=$(echo -n "${TIMESTAMP}.${PAYLOAD}" | openssl dgst -sha256 -hmac "whsec_YOUR_ENDPOINT_SECRET" | awk '{print $NF}')

# Send event
curl -X POST "https://api.promptjang.net/e/YOUR_ENDPOINT_ID" \
  -H "Authorization: Bearer pj_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-PJ-Signature: ${SIGNATURE}" \
  -H "X-PJ-Timestamp: ${TIMESTAMP}" \
  -d "$PAYLOAD"

Response:

json
{
  "id": "evt_abc123...",
  "status": "QUEUED",
  "message": "Event received and queued for delivery"
}

4. Check Delivery Status

bash
curl "https://api.promptjang.net/api/v1/events/evt_abc123..." \
  -H "Authorization: Bearer pj_live_YOUR_API_KEY"

Response includes all delivery attempts:

json
{
  "id": "evt_abc123...",
  "endpoint_id": "YOUR_ENDPOINT_ID",
  "event_type": "order.created",
  "status": "DELIVERED",
  "payload": { ... },
  "attempts": [
    {
      "id": "dat_...",
      "status_code": 200,
      "response_body": "OK",
      "duration_ms": 145,
      "created_at": "2026-05-26T12:00:01Z"
    }
  ]
}

5. Replay an Event

bash
curl -X POST "https://api.promptjang.net/api/v1/events/evt_abc123.../replay" \
  -H "Authorization: Bearer pj_live_YOUR_API_KEY"

Next Steps

Released under the MIT License.