sangtao.ai
API key

Webhooks

Get an endpoint

One endpoint and when it was last delivered to.

GEThttps://api.sangtao.ai/v2/webhooks/{id}

Authorization

  • X-Api-Keystring · headerrequired

    Your API key, from the API keys page of your account.

Path parameters

  • idstringrequired

    The ID in the path.

Response

  • idstringrequired

    The endpoint’s id, whk_…

  • urlstringrequired

    Where events are sent

  • eventsstring[]required

    The event types it gets. ["*"] is all of them

  • descriptionstring | null

    Your note

  • enabledbooleanrequired

    Whether events are sent to it

  • statusstringrequired

    disabled_failing: turned off after 3 days of failed deliveries

    Available options:activedisableddisabled_failing

  • createdAtstringrequired

    When it was created (ISO 8601, UTC). It only gets events from then on

  • lastDeliveryAtstring | null

    Last attempt to deliver to it

  • lastSuccessAtstring | null

    Last delivery it answered with 2xx

  • lastFailureAtstring | null

    Last failed attempt

Errors

StatuserrorCodeWhen
404WEBHOOK_NOT_FOUNDNo endpoint of yours with this id
GET/webhooks/{id}
curl "https://api.sangtao.ai/v2/webhooks/whk_4nP8rT2xK" \
  -H "X-Api-Key: YOUR_API_KEY"
{
  "success": true,
  "data": {
    "id": "whk_4nP8rT2xK",
    "url": "https://example.com/webhooks/sangtao",
    "events": [
      "image.completed",
      "image.failed"
    ],
    "description": "Production",
    "enabled": true,
    "status": "active",
    "createdAt": "2026-11-10T08:00:00Z",
    "lastDeliveryAt": "2026-11-10T09:43:32Z",
    "lastSuccessAt": "2026-11-10T09:43:32Z",
    "lastFailureAt": null
  }
}