> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.polytomic.com/2024-02-08/guides/configuring-your-connections/connections/webhook/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server.
# Webhook
Supports:
* ✅ Model sync destination
## Connection
### Configuration
| Name | Type | Description | Required |
auth_method |
string |
Authentication method
Accepted values: `polytomic_secret` ↓, `basic` ↓, `header` ↓, `query` ↓, `oauth_client_credentials` ↓ |
required |
headers |
array |
Additional headers |
optional |
url |
string |
Webhook URL |
required |
#### `auth_method`
When `auth_method` is `polytomic_secret`:
| Read-only property | Type | Description |
secret |
string |
Secret |
When `auth_method` is `basic`:
| Name | Type | Description | Required |
basic |
object |
Basic authentication |
required |
```json
{
"name": "Webhook connection",
"type": "webhook",
"configuration": {
"auth_method": "basic",
"basic": {
"password": "secret",
"username": "user@example.com"
},
"headers": [
{
"name": "foo",
"value": "bar"
}
],
"url": "https://example.com/webhook"
}
}
```
When `auth_method` is `header`:
| Name | Type | Description | Required |
header |
object |
Header |
required |
```json
{
"name": "Webhook connection",
"type": "webhook",
"configuration": {
"auth_method": "header",
"header": {
"name": "foo",
"value": "bar"
},
"headers": [
{
"name": "foo",
"value": "bar"
}
],
"url": "https://example.com/webhook"
}
}
```
When `auth_method` is `query`:
| Name | Type | Description | Required |
query |
array |
Query string authentication parameters |
required |
```json
{
"name": "Webhook connection",
"type": "webhook",
"configuration": {
"auth_method": "query",
"headers": [
{
"name": "foo",
"value": "bar"
}
],
"query": [
{
"name": "foo",
"value": "bar"
}
],
"url": "https://example.com/webhook"
}
}
```
When `auth_method` is `oauth_client_credentials`:
| Name | Type | Description | Required |
oauth |
object |
OAuth client credentials |
required |
```json
{
"name": "Webhook connection",
"type": "webhook",
"configuration": {
"auth_method": "oauth_client_credentials",
"headers": [
{
"name": "foo",
"value": "bar"
}
],
"oauth": {
"auth_style": 0,
"client_id": "client_id",
"client_secret": "client_secret",
"extra_form_data": [
{
"name": "foo",
"value": "bar"
}
],
"scopes": [],
"token_endpoint": "https://example.com/oauth/token"
},
"url": "https://example.com/webhook"
}
}
```
#### Example
```json
{
"name": "Webhook connection",
"type": "webhook",
"configuration": {
"auth_method": "polytomic_secret",
"headers": [
{
"name": "foo",
"value": "bar"
}
],
"url": "https://example.com/webhook"
}
}
```
## Model Sync
### Target
Webhook connections may be used as the destination in a model sync.
#### All targets
##### Configuration
| Name | Type | Description | Required |
batch_size |
integer |
Batch size per request |
optional |
metadata |
array |
Metadata |
optional |
record_requests |
boolean |
Capture webhook requests and responses |
optional |
##### Example
```json
{
...
"target": {
"configuration": {
"batch_size": 100,
"metadata": [],
"record_requests": true
}
}
}
```