sfGuardUser::postUpdate ======================= .. code-block:: json { "version": "0.1", "data": { "id": 12, "first_name": "Sanne", "last_name": "Schipper", "email_address": "sanne@kanoverhuurgroningen.nl", "username": "sanne", "is_active": true, "is_super_admin": false, "last_login": "2025-08-18T08:45:00+00:00", "locale": "nl_NL", "deleted_at": null, "created_at": "2025-08-18T08:30:00+00:00", "updated_at": "2025-08-18T09:10:00+00:00" }, "meta": {} } Explanation: - **id**: integer. - **first_name/last_name**: string|null. - **email_address**: string|null. RFC 5322 compliant. - **username**: non-empty-string. Unique. - Sensitive fields are not documented and may be omitted from examples. - **is_active**: boolean. - **is_super_admin**: boolean. - **last_login**: non-empty-string|null. ISO 8601 datetime. - **locale**: string. IETF language tag, max length 5 (e.g. `nl_NL`). - **deleted_at**: non-empty-string|null. ISO 8601 timestamp when soft-deleted. - **created_at/updated_at**: ISO 8601 datetime strings. Webhook selection: use `sfGuardUser::postInsert` for creations and `sfGuardUser::postUpdate` for updates. Webhooks ------------------- .. http:get:: /api2/webhooks Via this endpoint, the registered "webhooks" can be requested. **Example request**: .. sourcecode:: http GET /api2/webhooks HTTP/1.1 Host: demo.recras.nl Accept: application/json **Example response**: .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json [ { "id": 1, "created_by": null, "updated_by": null, "created_at": "-001-11-30T00:00:00+00:19", "updated_at": "-001-11-30T00:00:00+00:19", "name": "test", "url": "https://test.nl/webhook", "active": true } ] :statuscode 200: no error Register Webhook (Webhook Registreren) -------------------------------------- .. http:post:: /api2/webhooks With this endpoint, it is possible to create a webhook. **Example request**: .. sourcecode:: http POST /api2/webhooks HTTP/1.1 Host: demo.recras.nl Content-Type: application/json { "url": "https://test.nl/webhook", "name": "Contactpersoon::postInsert", "active": true } :json URL url: **Required** URL of the webhook to be called. :json string name: **Required** Name of the webhook to hook into; see above for a list of available webhooks. :json bool active: Whether the webhook is active or not. **Example response**: .. sourcecode:: http HTTP/1.1 201 OK Content-Type: application/json { "id": 1, "created_by": null, "updated_by": null, "created_at": "-001-11-30T00:00:00+00:19", "updated_at": "-001-11-30T00:00:00+00:19", "name": "Contactpersoon::postInsert", "url": "https://test.nl/webhook", "active": true } Deregister Webhook (Webhook Deregistreren) ------------------------------------------ .. http:delete:: /api2/webhooks/ With this endpoint, it is possible to delete a webhook. **Example request**: .. sourcecode:: http DELETE /api2/webhooks HTTP/1.1 Host: demo.recras.nl **Example response**: .. sourcecode:: http HTTP/1.1 200 OK Webhook Update ---------------------- .. http:put:: /api2/webhooks/ With this endpoint, it is possible to modify a webhook. **Example request**: .. sourcecode:: http PUT /api2/webhooks/ HTTP/1.1 Host: demo.recras.nl Content-Type: application/json { "url": "https://test.nl/webhook", "name": "", "active": true } :json URL url: URL of the webhook to be called. :json string name: Name of the webhook to hook into. :json bool active: Whether the webhook is active or not. **Example response**: .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "created_by": null, "updated_by": null, "created_at": "-001-11-30T00:00:00+00:19", "updated_at": "-001-11-30T00:00:00+00:19", "name": "Contactpersoon::postInsert", "url": "https://test.nl/webhook", "active": true }