Skip to content

Webhooks API

11 operationswebhooks:readwebhooks:write

Standard Webhooks events for finished work, signed, retried for a day, with delivery logs, replay and recovery.

GET/webhooks/endpointsList webhook endpoints.
POST/webhooks/endpointsSubscribe a URL to webhook events.
DELETE/webhooks/endpoints/{webhookEndpointId}Delete a webhook endpoint.
GET/webhooks/endpoints/{webhookEndpointId}Get a webhook endpoint.
PATCH/webhooks/endpoints/{webhookEndpointId}Update a webhook endpoint's URL, events or status.
POST/webhooks/endpoints/{webhookEndpointId}/rotate-secretRotate the signing secret of a webhook endpoint.
POST/webhooks/endpoints/{webhookEndpointId}/testSend a test event to a webhook endpoint and return its answer.
POST/webhooks/endpoints/{webhookEndpointId}/recoverRe-send the failed deliveries of an endpoint since a time.
GET/webhooks/deliveriesList webhook deliveries.
GET/webhooks/deliveries/{webhookDeliveryId}Get a webhook delivery with its attempts.
POST/webhooks/deliveries/{webhookDeliveryId}/replaySend one webhook delivery again.

Events

Every event is signed with Standard Webhooks. Read the delivery contract before you build a receiver.

crawl.completed5 fields
  • clientRef string
  • createdAt integer (int64)
  • data CrawlRunEventData
  • crawlId string
  • error string
  • failed integer (int64)
  • pages integer (int64)
  • runId string
  • id string
  • type string
crawl.failed5 fields
  • clientRef string
  • createdAt integer (int64)
  • data CrawlRunEventData
  • crawlId string
  • error string
  • failed integer (int64)
  • pages integer (int64)
  • runId string
  • id string
  • type string
crawl.page5 fields
  • clientRef string
  • createdAt integer (int64)
  • data CrawlPageEventData
  • changed boolean
  • crawlId string
  • finalUrl string
  • runId string
  • statusCode integer (int32)
  • url string
  • urlHash string
  • id string
  • type string
job.completed5 fields
  • clientRef string
  • createdAt integer (int64)
  • data JobEventData
  • browserResult BrowserResult | null
  • error string
  • exportResult ExportResult | null
  • flowResult FlowResult | null
  • jobId string
  • metadata map
  • result HttpResult | null
  • scheduleId string
  • scriptResult ScriptResult | null
  • skillsResult SkillsResult | null
  • status string
  • id string
  • type string
job.failed5 fields
  • clientRef string
  • createdAt integer (int64)
  • data JobEventData
  • browserResult BrowserResult | null
  • error string
  • exportResult ExportResult | null
  • flowResult FlowResult | null
  • jobId string
  • metadata map
  • result HttpResult | null
  • scheduleId string
  • scriptResult ScriptResult | null
  • skillsResult SkillsResult | null
  • status string
  • id string
  • type string
screenshot.completed5 fields
  • clientRef string
  • createdAt integer (int64)
  • data ScreenshotEventData
  • contentType string
  • errorCode string
  • errorMessage string
  • finalUrl string
  • height integer (int32)
  • httpStatus integer (int32)
  • screenshotId string
  • sizeBytes integer (int64)
  • status string
  • truncated boolean
  • width integer (int32)
  • id string
  • type string
screenshot.failed5 fields
  • clientRef string
  • createdAt integer (int64)
  • data ScreenshotEventData
  • contentType string
  • errorCode string
  • errorMessage string
  • finalUrl string
  • height integer (int32)
  • httpStatus integer (int32)
  • screenshotId string
  • sizeBytes integer (int64)
  • status string
  • truncated boolean
  • width integer (int32)
  • id string
  • type string
serp.completed5 fields
  • clientRef string
  • createdAt integer (int64)
  • data SerpEventData
  • error string
  • matchedUrl string
  • metadata map
  • provider string
  • rank integer (int32) | null
  • rankAbsolute integer (int32) | null
  • serpCheckId string
  • status string
  • targetFeatures string[]
  • id string
  • type string
serp.failed5 fields
  • clientRef string
  • createdAt integer (int64)
  • data SerpEventData
  • error string
  • matchedUrl string
  • metadata map
  • provider string
  • rank integer (int32) | null
  • rankAbsolute integer (int32) | null
  • serpCheckId string
  • status string
  • targetFeatures string[]
  • id string
  • type string

List webhook endpoints.

GET/v1/webhooks/endpoints
scope webhooks:read

Parameters

page
integer
limit
integer
withTotal
boolean

Response

18 fields
pageOptionsPageResult | null
hasNextboolean
pageinteger (int32)
totalinteger (int64)
resultsWebhookEndpoint[]
chatIdstring
createdAtinteger (int64)
eventTypesstring[]
namestring
previousSecretExpiresAtinteger (int64)
secretstring
secretHintstring
statusstring
threadIdinteger (int64)
typestring
updatedAtinteger (int64)
urlstring
webhookEndpointIdstring
curl "https://api.hoshime.com/v1/webhooks/endpoints" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "pageOptions": {
    "hasNext": false,
    "page": 0,
    "total": 0
  },
  "results": [
    {
      "chatId": "abc123",
      "createdAt": 0,
      "eventTypes": [
        "…"
      ],
      "name": "…",
      "previousSecretExpiresAt": 0,
      "secret": "…",
      "secretHint": "…",
      "status": "…",
      "threadId": 0,
      "type": "…",
      "updatedAt": 0,
      "url": "https://…",
      "webhookEndpointId": "abc123"
    }
  ]
}

Subscribe a URL to webhook events.

POST/v1/webhooks/endpoints
scope webhooks:write

Request body

botToken
string
chatId
string
eventTypes
string[]
required
idempotencyKey
string
name
string
threadId
integer (int64)
type
string
url
string

Response

13 fields
chatIdstring
createdAtinteger (int64)
eventTypesstring[]
namestring
previousSecretExpiresAtinteger (int64)
secretstring
secretHintstring
statusstring
threadIdinteger (int64)
typestring
updatedAtinteger (int64)
urlstring
webhookEndpointIdstring
curl -X POST "https://api.hoshime.com/v1/webhooks/endpoints" \
  -H "Authorization: Bearer $HOSHIME_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "botToken": "…",
    "chatId": "abc123",
    "eventTypes": [
      "…"
    ],
    "idempotencyKey": "…",
    "name": "…",
    "threadId": 0,
    "type": "…",
    "url": "https://…"
  }'
200 Response shape
{
  "chatId": "abc123",
  "createdAt": 0,
  "eventTypes": [
    "…"
  ],
  "name": "…",
  "previousSecretExpiresAt": 0,
  "secret": "…",
  "secretHint": "…",
  "status": "…",
  "threadId": 0,
  "type": "…",
  "updatedAt": 0,
  "url": "https://…",
  "webhookEndpointId": "abc123"
}

Delete a webhook endpoint.

DELETE/v1/webhooks/endpoints/{webhookEndpointId}
scope webhooks:write

Parameters

webhookEndpointId
string · path
required

Response

1 fields
statusboolean
curl -X DELETE "https://api.hoshime.com/v1/webhooks/endpoints/{webhookEndpointId}" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "status": false
}

Get a webhook endpoint.

GET/v1/webhooks/endpoints/{webhookEndpointId}
scope webhooks:read

Parameters

webhookEndpointId
string · path
required

Response

13 fields
chatIdstring
createdAtinteger (int64)
eventTypesstring[]
namestring
previousSecretExpiresAtinteger (int64)
secretstring
secretHintstring
statusstring
threadIdinteger (int64)
typestring
updatedAtinteger (int64)
urlstring
webhookEndpointIdstring
curl "https://api.hoshime.com/v1/webhooks/endpoints/{webhookEndpointId}" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "chatId": "abc123",
  "createdAt": 0,
  "eventTypes": [
    "…"
  ],
  "name": "…",
  "previousSecretExpiresAt": 0,
  "secret": "…",
  "secretHint": "…",
  "status": "…",
  "threadId": 0,
  "type": "…",
  "updatedAt": 0,
  "url": "https://…",
  "webhookEndpointId": "abc123"
}

Update a webhook endpoint's URL, events or status.

PATCH/v1/webhooks/endpoints/{webhookEndpointId}
scope webhooks:write

Parameters

webhookEndpointId
string · path
required

Request body

botToken
string
chatId
string
eventTypes
string[]
name
string
status
string
threadId
integer (int64)
url
string

Response

13 fields
chatIdstring
createdAtinteger (int64)
eventTypesstring[]
namestring
previousSecretExpiresAtinteger (int64)
secretstring
secretHintstring
statusstring
threadIdinteger (int64)
typestring
updatedAtinteger (int64)
urlstring
webhookEndpointIdstring
curl -X PATCH "https://api.hoshime.com/v1/webhooks/endpoints/{webhookEndpointId}" \
  -H "Authorization: Bearer $HOSHIME_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "botToken": "…",
    "chatId": "abc123",
    "eventTypes": [
      "…"
    ],
    "name": "…",
    "status": "…",
    "threadId": 0,
    "url": "https://…"
  }'
200 Response shape
{
  "chatId": "abc123",
  "createdAt": 0,
  "eventTypes": [
    "…"
  ],
  "name": "…",
  "previousSecretExpiresAt": 0,
  "secret": "…",
  "secretHint": "…",
  "status": "…",
  "threadId": 0,
  "type": "…",
  "updatedAt": 0,
  "url": "https://…",
  "webhookEndpointId": "abc123"
}

Rotate the signing secret of a webhook endpoint.

POST/v1/webhooks/endpoints/{webhookEndpointId}/rotate-secret
scope webhooks:write

Parameters

webhookEndpointId
string · path
required

Response

13 fields
chatIdstring
createdAtinteger (int64)
eventTypesstring[]
namestring
previousSecretExpiresAtinteger (int64)
secretstring
secretHintstring
statusstring
threadIdinteger (int64)
typestring
updatedAtinteger (int64)
urlstring
webhookEndpointIdstring
curl -X POST "https://api.hoshime.com/v1/webhooks/endpoints/{webhookEndpointId}/rotate-secret" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "chatId": "abc123",
  "createdAt": 0,
  "eventTypes": [
    "…"
  ],
  "name": "…",
  "previousSecretExpiresAt": 0,
  "secret": "…",
  "secretHint": "…",
  "status": "…",
  "threadId": 0,
  "type": "…",
  "updatedAt": 0,
  "url": "https://…",
  "webhookEndpointId": "abc123"
}

Send a test event to a webhook endpoint and return its answer.

POST/v1/webhooks/endpoints/{webhookEndpointId}/test
scope webhooks:write

Parameters

webhookEndpointId
string · path
required

Response

5 fields
errorstring
latencyMsinteger (int32)
okboolean
responsePreviewstring
statusCodeinteger (int32)
curl -X POST "https://api.hoshime.com/v1/webhooks/endpoints/{webhookEndpointId}/test" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "error": "…",
  "latencyMs": 0,
  "ok": false,
  "responsePreview": "…",
  "statusCode": 0
}

Re-send the failed deliveries of an endpoint since a time.

POST/v1/webhooks/endpoints/{webhookEndpointId}/recover
scope webhooks:write

Parameters

webhookEndpointId
string · path
required

Request body

since
integer (int64)

Response

1 fields
countinteger (int64)
curl -X POST "https://api.hoshime.com/v1/webhooks/endpoints/{webhookEndpointId}/recover" \
  -H "Authorization: Bearer $HOSHIME_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "since": 0
  }'
200 Response shape
{
  "count": 0
}

List webhook deliveries.

GET/v1/webhooks/deliveries
scope webhooks:read

Parameters

webhookEndpointId
string
status
string
eventType
string
page
integer
limit
integer
withTotal
boolean
webhookEventId
string

Response

25 fields
pageOptionsPageResult | null
hasNextboolean
pageinteger (int32)
totalinteger (int64)
resultsWebhookDelivery[]
attemptinteger (int32)
createdAtinteger (int64)
eventTypestring
lastErrorstring
latencyMsinteger (int32)
nextAttemptAtinteger (int64)
payloadEvent | null
clientRefstring
createdAtinteger (int64)
dataobject | null
idstring
typestring
responseBodyPreviewstring
responseStatusCodeinteger (int32)
statusstring
ttlinteger (int64)
updatedAtinteger (int64)
webhookDeliveryIdstring
webhookEndpointIdstring
webhookEventIdstring
curl "https://api.hoshime.com/v1/webhooks/deliveries" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "pageOptions": {
    "hasNext": false,
    "page": 0,
    "total": 0
  },
  "results": [
    {
      "attempt": 0,
      "createdAt": 0,
      "eventType": "…",
      "lastError": "…",
      "latencyMs": 0,
      "nextAttemptAt": 0,
      "payload": null,
      "responseBodyPreview": "…",
      "responseStatusCode": 0,
      "status": "…",
      "ttl": 0,
      "updatedAt": 0,
      "webhookDeliveryId": "abc123",
      "webhookEndpointId": "abc123",
      "webhookEventId": "abc123"
    }
  ]
}

Get a webhook delivery with its attempts.

GET/v1/webhooks/deliveries/{webhookDeliveryId}
scope webhooks:read

Parameters

webhookDeliveryId
string · path
required

Response

20 fields
attemptinteger (int32)
createdAtinteger (int64)
eventTypestring
lastErrorstring
latencyMsinteger (int32)
nextAttemptAtinteger (int64)
payloadEvent | null
clientRefstring
createdAtinteger (int64)
dataobject | null
idstring
typestring
responseBodyPreviewstring
responseStatusCodeinteger (int32)
statusstring
ttlinteger (int64)
updatedAtinteger (int64)
webhookDeliveryIdstring
webhookEndpointIdstring
webhookEventIdstring
curl "https://api.hoshime.com/v1/webhooks/deliveries/{webhookDeliveryId}" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "attempt": 0,
  "createdAt": 0,
  "eventType": "…",
  "lastError": "…",
  "latencyMs": 0,
  "nextAttemptAt": 0,
  "payload": {
    "clientRef": "…",
    "createdAt": 0,
    "data": {},
    "id": "abc123",
    "type": "…"
  },
  "responseBodyPreview": "…",
  "responseStatusCode": 0,
  "status": "…",
  "ttl": 0,
  "updatedAt": 0,
  "webhookDeliveryId": "abc123",
  "webhookEndpointId": "abc123",
  "webhookEventId": "abc123"
}

Send one webhook delivery again.

POST/v1/webhooks/deliveries/{webhookDeliveryId}/replay
scope webhooks:write

Parameters

webhookDeliveryId
string · path
required

Response

20 fields
attemptinteger (int32)
createdAtinteger (int64)
eventTypestring
lastErrorstring
latencyMsinteger (int32)
nextAttemptAtinteger (int64)
payloadEvent | null
clientRefstring
createdAtinteger (int64)
dataobject | null
idstring
typestring
responseBodyPreviewstring
responseStatusCodeinteger (int32)
statusstring
ttlinteger (int64)
updatedAtinteger (int64)
webhookDeliveryIdstring
webhookEndpointIdstring
webhookEventIdstring
curl -X POST "https://api.hoshime.com/v1/webhooks/deliveries/{webhookDeliveryId}/replay" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "attempt": 0,
  "createdAt": 0,
  "eventType": "…",
  "lastError": "…",
  "latencyMs": 0,
  "nextAttemptAt": 0,
  "payload": {
    "clientRef": "…",
    "createdAt": 0,
    "data": {},
    "id": "abc123",
    "type": "…"
  },
  "responseBodyPreview": "…",
  "responseStatusCode": 0,
  "status": "…",
  "ttl": 0,
  "updatedAt": 0,
  "webhookDeliveryId": "abc123",
  "webhookEndpointId": "abc123",
  "webhookEventId": "abc123"
}
esc
↑↓ move↵ open