Appearance
Endpoints
Endpoints represent the target URLs where PromptJang delivers your events.
List Endpoints
GET /api/v1/endpointsResponse
json
{
"endpoints": [
{
"id": "4e2eba24818c6a8bbbdab486cfad9785",
"name": "Orders production",
"url": "https://example.com/webhooks",
"description": "Production webhook",
"event_types": "[\"order.created\",\"order.updated\"]",
"max_payload_bytes": 262144,
"max_retries": 5,
"retry_interval_seconds": 60,
"enabled": true,
"created_at": 1787736000,
"updated_at": 1787736000
}
]
}Create Endpoint
POST /api/v1/endpointsRequest Body
| Field | Required | Description |
|---|---|---|
name | Yes | Human-readable target name |
url | Yes | Target HTTPS URL, validated for SSRF |
description | No | Human-readable description |
event_types | No | Array of event types to filter (empty = all events) |
json
{
"name": "Orders production",
"url": "https://example.com/webhooks",
"description": "Production webhook",
"event_types": ["order.created", "order.updated"]
}Response
HTTP 200 OKjson
{
"id": "4e2eba24...",
"secret": "whsec_0f99932b..."
}The secret is returned only on creation. Store it immediately; the receiving target uses it to verify PromptJang signatures.
Get Endpoint
GET /api/v1/endpoints/:idResponse
Returns { "endpoint": { ... } } with the same endpoint fields shown by the list route. It never returns the signing secret.
Update Endpoint
PATCH /api/v1/endpoints/:idRequest Body
All fields are optional (partial update):
json
{
"name": "Orders primary",
"url": "https://new.example.com/webhooks",
"description": "Updated description",
"event_types": ["order.created"],
"enabled": false
}Response
json
{
"endpoint": {
"id": "4e2eba24...",
"name": "Orders primary",
"url": "https://new.example.com/webhooks",
"description": "Updated description",
"event_types": "[\"order.created\"]",
"enabled": false,
"updated_at": 1787739600
}
}Delete Endpoint
DELETE /api/v1/endpoints/:idResponse
HTTP 200 OKjson
{
"deleted": true
}