> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zapnito.com/llms.txt
> Use this file to discover all available pages before exploring further.

# User registered webhook

> Receive a JSON payload at your own URL when a new user registers on your Zapnito community, including their name, email and company.

Subscribe a URL of your choosing to be notified when a new user registers on your community. Before you start, read the [webhooks overview](/webhooks/overview) for how subscriptions and authentication work.

## Payload

When you subscribe to the User registered webhook, your URL is sent a JSON payload with details of the event.

### Request headers

```text title="Headers sent to your URL" theme={null}
Accept: application/json
X-Zapnito-Hostname: community.acme.org
Authorization: Token token=YOUR_ENDPOINT_TOKEN
```

* `X-Zapnito-Hostname` is the hostname of the Zapnito community that sent the event.
* `Authorization` is only sent if you set an `authorization_token` when you created the subscription.

### Example payload

<ResponseExample>
  ```json title="User registered payload" theme={null}
  {
    "name": "Alex Smith",
    "first_name": "Alex",
    "last_name": "Smith",
    "email": "alex.smith@example.com",
    "title": "Compliance Analyst",
    "professional_reg_number": "ABC123",
    "company": "Harbour Capital",
    "country": "GB",
    "type": "Person",
    "created_at": "2026-03-02 09:15",
    "updated_at": "2026-03-02 10:45",
    "confirmed": "true",
    "confirmed_at": "2026-03-02 10:45"
  }
  ```
</ResponseExample>

## Create a subscription

<ParamField header="Authorization" type="string" required>
  Your API token in the format `Token token=YOUR_API_TOKEN`.
</ParamField>

<ParamField body="url" type="string" required>
  The URL you want Zapnito to notify when a new user registers on your community.
</ParamField>

<ParamField body="authorization_token" type="string">
  A token that Zapnito sends in the `Authorization` header of each request to your URL, in the format `Token token=YOUR_ENDPOINT_TOKEN`.
</ParamField>

```bash title="Create a subscription" theme={null}
curl -X POST https://your-community.zapnito.com/api/v1/rest_hooks/user_registered/subscriptions \
  -H "Authorization: Token token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/webhooks/user-registered", "authorization_token": "YOUR_ENDPOINT_TOKEN"}'
```

`POST https://your-community.zapnito.com/api/v1/rest_hooks/user_registered/subscriptions`

* `201 Created`: the subscription was created. The response body is `{"id": "27"}`. Keep the `id` so you can delete the subscription later.

## Delete a subscription

Remove a previously registered URL for the User registered webhook.

<ParamField header="Authorization" type="string" required>
  Your API token in the format `Token token=YOUR_API_TOKEN`.
</ParamField>

<ParamField path="id" type="integer" required>
  The ID of the subscription that was returned when you created it.
</ParamField>

```bash title="Delete a subscription" theme={null}
curl -X DELETE https://your-community.zapnito.com/api/v1/rest_hooks/user_registered/subscriptions/27 \
  -H "Authorization: Token token=YOUR_API_TOKEN"
```

`DELETE https://your-community.zapnito.com/api/v1/rest_hooks/user_registered/subscriptions/:id`

* `204 No Content`: the subscription was deleted.
* `404 Not Found`: no subscription matches the provided ID.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.