FansquareAPI reference
Open the app

Webhook endpoints

Get delivery counters

GET/v1/webhooks/{endpoint_id}/stats

Delivered and failed totals per event type over the window. Counters are kept about 90 days; the window defaults to the last 7 days.

Required scoperead:webhooks
Rate limit60 requests per minute
curl 'https://api.fansquare.so/v1/webhooks/67a55c69-e54b-4b90-a9f9-e000f12eb3fd/stats' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "data": [
    {
      "event_type": "order.created",
      "delivered_count": 128,
      "failed_count": 2
    }
  ]
}

Parameters

Headers

  • Fansquare-Versionstringrequired

    API version to pin. Accepts the mineral name or the release date of a version.

Path

  • endpoint_idstringrequired

    Webhook endpoint id (the id field of endpoint items).

    format uuid

Query

  • startstring

    Window start (ISO 8601, inclusive). Default: 7 days ago.

    format date-time
  • endstring

    Window end (ISO 8601, exclusive). Default: now.

    format date-time

Response

OK, application/json

  • dataarray of objectsrequired
    • event_typestringrequired

      Event type the counters are for.

      Valuesorder.createdorder.refundedassignment.updatedconversation.ai_control_requestedping
    • delivered_countintegerrequired

      Deliveries acknowledged by the endpoint (any 2xx) in the window.

    • failed_countintegerrequired

      Deliveries that exhausted their retries in the window.

curl 'https://api.fansquare.so/v1/webhooks/67a55c69-e54b-4b90-a9f9-e000f12eb3fd/stats' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "data": [
    {
      "event_type": "order.created",
      "delivered_count": 128,
      "failed_count": 2
    }
  ]
}