HookSniff Swift SDK

May 18, 2026 · View on GitHub

License

Swift SDK for the HookSniff webhook delivery platform.

Installation

Add to your Package.swift:

dependencies: [
    .package(url: "https://github.com/servetarslan02/hooksniff-swift", from: "1.2.0")
]

Quick Start

import HookSniffSDK

let client = HookSniff(apiKey: "hooksniff_xxx")

// List endpoints
let endpoints = try await client.endpoint.list()

// Send a webhook
let delivery = try await client.message.create(
    endpointId: "ep_xxx",
    event: "order.created",
    data: ["order_id": "123", "amount": 99.99]
)

Webhook Verification

let wh = try Webhook(secret: "whsec_xxx")
let payload = try wh.verify(body: body, headers: headers)

API Resources

ResourceMethods
Endpointlist, create, get, update, delete
Messagecreate, list, get
MessageAttemptlist, listByMsg, get, resend
Authenticationlogin, register, logout
EventTypelist, create, get, update, delete
StreamlistChannels, getChannel, createChannel, subscribe, publish
BackgroundTasklist, get
Connectorlist, get
Integrationlist, get, create, update, delete
Inboundlist, create, get, delete
Statisticsaggregate

Features

  • ✅ HMAC-SHA256 webhook verification
  • ✅ Typed webhook events
  • ✅ Automatic retry with exponential backoff
  • ✅ Pagination helpers
  • ✅ Rate limit header parsing
  • ✅ SSE streaming
  • ✅ Idempotency keys
  • ✅ Configurable URLSession

License

MIT