> This page is for API, version 2026-01-01 (Stable) (default).
> For other versions, use one of these documentation indexes:
> - 2026-01-01 (Stable) (default): https://developer.deel.com/api/stable/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.deel.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.deel.com/_mcp/server.

# Create a webhook

POST https://api.letsdeel.com/rest/webhooks
Content-Type: application/json

Creates a new webhook subscription with the specified URL, events, and configuration. Returns the created webhook, including its signing key for verifying incoming event payloads.

 **Token scopes**: `webhooks:write`

Reference: https://developer.deel.com/api/endpoints/webhooks/create-webhook

## Authentication

- `Authorization` header (bearer token, required) — ## Authentication The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail. ```curl curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \ -H 'Authorization: Bearer YOUR-TOKEN-HERE' ``` [Learn more about authentication](/api/authentication)
- `Authorization` header (bearer token, required) — Standard OAuth2 security scheme based on https://swagger.io/docs/specification/authentication/

## Servers

- `https://api.letsdeel.com/rest` (Production, default)
- `https://api-staging.letsdeel.com/rest` (Demo)

## Request

### Body (application/json)

This endpoint expects an object.

- `url` (string, required) — Endpoint to receive webhook.
- `name` (string, required, nullable) — Webhook subscription name.
- `events` (list of string, required) — The list of events to enable for this subscription.
- `status` (enum, required) — Status of webhook.
  - Allowed values: `enabled`, `disabled`
- `api_version` (string, required, default: v2) — Deel API version. Only v2 is accepted.
- `description` (string, required, nullable) — Webhook subscription description.
- `signing_key` (string, optional, nullable) — The webhook's signing key, used to generate webhook signatures. Auto-generated if omitted.
- `include_child_orgs` (boolean, optional, nullable) — When true, the webhook will also receive events from child organizations.

## Response

### 201

successful operation

- `data` (WebhooksPostResponsesContentApplicationJsonSchemaData, required) — The webhook subscription.

## Errors

### 400 Bad Request Error

Bad Request. The request could not be understood or was missing required parameters.

- `errors` (list of WebhooksPostResponsesContentApplicationJsonSchemaErrorsItems, required) — The list of errors that caused the request to fail.

### 401 Unauthorized Error

Unauthorized. Authentication credentials were missing or invalid.

- `errors` (list of WebhooksPostResponsesContentApplicationJsonSchemaErrorsItems, required) — The list of errors that caused the request to fail.

### 403 Forbidden Error

Forbidden. You do not have permission to access this resource.

- `errors` (list of WebhooksPostResponsesContentApplicationJsonSchemaErrorsItems, required) — The list of errors that caused the request to fail.

### 404 Not Found Error

Not Found. The requested resource could not be found.

- `errors` (list of WebhooksPostResponsesContentApplicationJsonSchemaErrorsItems, required) — The list of errors that caused the request to fail.

### 405 Method Not Allowed Error

Method Not Allowed. The HTTP method is not supported for this resource.

- `errors` (list of WebhooksPostResponsesContentApplicationJsonSchemaErrorsItems, required) — The list of errors that caused the request to fail.

### 429 Too Many Requests Error

Too Many Requests. The rate limit has been exceeded.

- `errors` (list of WebhooksPostResponsesContentApplicationJsonSchemaErrorsItems, required) — The list of errors that caused the request to fail.

### 500 Internal Server Error

Internal Server Error. An unexpected error occurred.

- `errors` (list of WebhooksPostResponsesContentApplicationJsonSchemaErrorsItems, required) — The list of errors that caused the request to fail.

## Types

### WebhooksPostResponsesContentApplicationJsonSchemaData

The webhook subscription.

- `id` (string, required) — Unique identifier of this resource.
- `url` (string, required) — Endpoint to receive webhook.
- `name` (string, required, nullable) — Webhook subscription name.
- `events` (list of string, required) — The list of events to enable for this subscription.
- `status` (enum, required) — Status of webhook.
  - Allowed values: `enabled`, `disabled`
- `created_at` (string, required) — Time at which the webhook was created.
- `updated_at` (string, required) — Time at which the webhook was updated.
- `api_version` (string, required, default: v2) — Deel API version. Currently Deel accepts v1 or v2 version.
- `description` (string, required, nullable) — Webhook subscription description.
- `signing_key` (string, required, nullable) — The webhook's signing key, used to generate webhook signatures.
- `hidden` (boolean, optional, nullable) — Property to hide the webhook from frontend view. Commonly by Deel 3rd party apps
- `internal` (boolean, optional) — Indicates whether the webhook is internal to Deel.
- `deleted_at` (string, optional, nullable) — Time at which the webhook was deleted.
- `include_child_orgs` (boolean, optional, nullable) — When true, the webhook will also receive events from child organizations.

### WebhooksPostResponsesContentApplicationJsonSchemaErrorsItems

- `message` (string, required) — Human-readable description of the error.
- `error_code` (string, optional) — Machine-readable error code.

## Examples

**Request**

```json
{
  "url": "https://mywebhook.com",
  "name": "My first webhook.",
  "events": [
    "contract.created"
  ],
  "status": "enabled",
  "api_version": "v2",
  "description": "I like it very much."
}
```

**Response**

```json
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "url": "https://mywebhook.com/listening",
    "name": "My webhooks",
    "events": [
      "contract.created"
    ],
    "status": "enabled",
    "created_at": "2024-01-01T12:00:00Z",
    "updated_at": "2024-01-02T12:00:00Z",
    "api_version": "v2",
    "description": "My first webhook",
    "signing_key": "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGH",
    "hidden": false,
    "internal": false,
    "deleted_at": "2024-01-03T12:00:00Z",
    "include_child_orgs": false
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.letsdeel.com/rest/webhooks"

payload = {
    "url": "https://mywebhook.com",
    "name": "My first webhook.",
    "events": ["contract.created"],
    "status": "enabled",
    "api_version": "v2",
    "description": "I like it very much."
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.letsdeel.com/rest/webhooks';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"url":"https://mywebhook.com","name":"My first webhook.","events":["contract.created"],"status":"enabled","api_version":"v2","description":"I like it very much."}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.letsdeel.com/rest/webhooks"

	payload := strings.NewReader("{\n  \"url\": \"https://mywebhook.com\",\n  \"name\": \"My first webhook.\",\n  \"events\": [\n    \"contract.created\"\n  ],\n  \"status\": \"enabled\",\n  \"api_version\": \"v2\",\n  \"description\": \"I like it very much.\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/webhooks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"url\": \"https://mywebhook.com\",\n  \"name\": \"My first webhook.\",\n  \"events\": [\n    \"contract.created\"\n  ],\n  \"status\": \"enabled\",\n  \"api_version\": \"v2\",\n  \"description\": \"I like it very much.\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.letsdeel.com/rest/webhooks")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"url\": \"https://mywebhook.com\",\n  \"name\": \"My first webhook.\",\n  \"events\": [\n    \"contract.created\"\n  ],\n  \"status\": \"enabled\",\n  \"api_version\": \"v2\",\n  \"description\": \"I like it very much.\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.letsdeel.com/rest/webhooks', [
  'body' => '{
  "url": "https://mywebhook.com",
  "name": "My first webhook.",
  "events": [
    "contract.created"
  ],
  "status": "enabled",
  "api_version": "v2",
  "description": "I like it very much."
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/webhooks");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"url\": \"https://mywebhook.com\",\n  \"name\": \"My first webhook.\",\n  \"events\": [\n    \"contract.created\"\n  ],\n  \"status\": \"enabled\",\n  \"api_version\": \"v2\",\n  \"description\": \"I like it very much.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "url": "https://mywebhook.com",
  "name": "My first webhook.",
  "events": ["contract.created"],
  "status": "enabled",
  "api_version": "v2",
  "description": "I like it very much."
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/webhooks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```