---
title: "Register a webhook"
method: POST
path: "/api/agent/webhooks"
---

# Register a webhook

`POST /api/agent/webhooks`

## Request

- Base URL: `https://sesapp.fr`
- URL: `https://sesapp.fr/api/agent/webhooks`
- Auth: HTTP bearer

HTTPS URL. Events default to all: fiche.viewed, share.created, share.revoked, wifi.unlocked, quota.warning. Secret returned once. Sign: HMAC-SHA256(secret, `${unix}.${rawBody}`) in X-SesApp-Signature as t=unix,v1=hex. 3 retries (0 / 0.5 / 2 s). Max 5 endpoints. At-least-once, deferred after the triggering request.

## Request body

- object
  - `url` string, uri, required
  - `events` string[]

## Response `200`

{ id, url, events, secret }

## Other responses

- `400`: INVALID_PARAMS
- `401`: UNAUTHORIZED — missing or invalid Bearer
- `402`: x402 payment required (expired plan or overage). Body is not ApiError.
- `403`: FORBIDDEN or QUOTA_EXCEEDED (host plans without overage)
- `429`: RATE_LIMITED. Headers X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After.

---

[API](https://skmtc.dev/sesapp/apis/sesapp-agent-api.md) · [All operations](https://skmtc.dev/sesapp/apis/sesapp-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sesapp/apis/sesapp-agent-api/revisions/8d819a96c5bf?raw)
