---
title: "Create webhook"
url: https://docs.gleap.ai/en/reference/rest-api/post-s2s-webhooks
method: POST
path: "/s2s/webhooks"
api: "API Reference"
tag: "S2S Webhooks"
operationId: "Create"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Create webhook

`POST https://api.gleap.io/v3/s2s/webhooks`

Register a webhook endpoint. The signing secret is returned exactly once.

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Request body (`application/json`, required)

- `url` (string, required)
- `events` (string[]): Event types to deliver; omit for all.
- `description` (string)

## Example request

```bash
curl --request POST \
  --url https://api.gleap.io/v3/s2s/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "<url>"
}'
```

## Responses

### 201 (`application/json`)

Created

- `id` (string, required)
- `url` (string, required)
- `enabled` (boolean, required)
- `events` (string[], required)
- `description` (string)
- `secret` (string, required): Masked; the full secret is returned once at creation.
- `createdAt` (string<date-time>, required)

```json
{
  "id": "string",
  "url": "string",
  "enabled": true,
  "events": [
    "string"
  ],
  "description": "string",
  "secret": "string",
  "createdAt": "2026-01-01T12:00:00Z"
}
```
