HookSniff.Endpoints (hooksniff v1.2.0)

Manage webhook endpoints — create, list, update, delete, rotate secrets.

Summary

Functions

Create a new endpoint

Delete an endpoint

Get endpoint by ID

Get endpoint headers

List endpoints (paginated). Accepts :limit and :offset opts.

Rotate the signing secret for an endpoint

Update an endpoint

Update endpoint headers

Functions

create(client, params)

@spec create(HookSniff.t(), map()) :: {:ok, map()} | {:error, term()}

Create a new endpoint

delete(client, id)

@spec delete(HookSniff.t(), String.t()) :: {:ok, map()} | {:error, term()}

Delete an endpoint

get(client, id)

@spec get(HookSniff.t(), String.t()) :: {:ok, map()} | {:error, term()}

Get endpoint by ID

get_headers(client, id)

@spec get_headers(HookSniff.t(), String.t()) :: {:ok, map()} | {:error, term()}

Get endpoint headers

list(client, opts \\ [])

@spec list(
  HookSniff.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

List endpoints (paginated). Accepts :limit and :offset opts.

rotate_secret(client, id)

@spec rotate_secret(HookSniff.t(), String.t()) :: {:ok, map()} | {:error, term()}

Rotate the signing secret for an endpoint

update(client, id, params)

@spec update(HookSniff.t(), String.t(), map()) :: {:ok, map()} | {:error, term()}

Update an endpoint

update_headers(client, id, params)

@spec update_headers(HookSniff.t(), String.t(), map()) ::
  {:ok, map()} | {:error, term()}

Update endpoint headers