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

# Retrieve a webhook event schema

GET https://api.middesk.com/v1/webhooks/{webhook_id}/event_schemas/{id}

Retrieves one active webhook event schema scoped to the parent webhook.

Reference: https://docs.middesk.com/api-reference/webhooks/get-webhook-event-schema

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `webhook_id` (string, required) — Webhook ID
- `id` (string, required) — Webhook event schema ID

## Response

### 200

webhook event schema found

- `object` (enum, required)
  - Allowed values: `webhook_event_schema`
- `id` (string, required) — Unique identifier for this webhook event schema.
- `namespace` (string, required) — Event namespace for the schema override. Currently supported business event namespaces are business.created and business.updated.
- `schema` (string, required) — GraphQL selection set rooted at the event object for the namespace. For `business.updated`, select fields directly from the Business object. The selection replaces only `data.object` in delivered webhook payloads.
- `created_at` (datetime, required)
- `updated_at` (datetime, required)

## Errors

### 404 Get Webhook Event Schema Request Not Found Error

webhook event schema not found

- `errors` (list of ErrorResponseErrorsItem, required)

## Types

### ErrorResponseErrorsItem

- `message` (string, required)
- `parameter` (string, optional) — Request parameter associated with the error, when applicable

## Examples

**Response**

```json
{
  "object": "webhook_event_schema",
  "id": "3f2a1c9e-8b4d-4e21-9c77-1a2b3c4d5e6f",
  "namespace": "business.updated",
  "schema": "{ id name status }",
  "created_at": "2025-01-07T12:00:00Z",
  "updated_at": "2025-01-07T12:00:00Z"
}
```

**SDK Code**

```python Webhook event schema
import requests

url = "https://api.middesk.com/v1/webhooks/webhook_id/event_schemas/id"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Webhook event schema
const url = 'https://api.middesk.com/v1/webhooks/webhook_id/event_schemas/id';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go Webhook event schema
package main

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

func main() {

	url := "https://api.middesk.com/v1/webhooks/webhook_id/event_schemas/id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby Webhook event schema
require 'uri'
require 'net/http'

url = URI("https://api.middesk.com/v1/webhooks/webhook_id/event_schemas/id")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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

```java Webhook event schema
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.middesk.com/v1/webhooks/webhook_id/event_schemas/id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.middesk.com/v1/webhooks/webhook_id/event_schemas/id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Webhook event schema
using RestSharp;

var client = new RestClient("https://api.middesk.com/v1/webhooks/webhook_id/event_schemas/id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Webhook event schema
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.middesk.com/v1/webhooks/webhook_id/event_schemas/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```