# Create a Reply webhook; its signing secret is returned once

Save an HTTPS endpoint with a generic, Grok, or Slack payload preset. Pass its whk_ ID as webhookId when creating a prompt, set a service's defaultReplyWebhookId, or set isDefault:true for account replies including MCP/API prompts without services. Account and selected endpoints each receive one event, deduplicated by endpoint ID. Store the signingSecret securely to verify signed deliveries.

HTML: https://notify.belweave.ai/docs/api/postWebhooks

Required scopes: `services:write`

```http
POST /api/agent/webhooks
Authorization: Bearer ntf_your_token
```

## Operation schema

```json
{
  "summary": "Create a Reply webhook; its signing secret is returned once",
  "description": "Save an HTTPS endpoint with a generic, Grok, or Slack payload preset. Pass its whk_ ID as webhookId when creating a prompt, set a service's defaultReplyWebhookId, or set isDefault:true for account replies including MCP/API prompts without services. Account and selected endpoints each receive one event, deduplicated by endpoint ID. Store the signingSecret securely to verify signed deliveries.",
  "operationId": "postWebhooks",
  "security": [
    {
      "bearer": [
        "services:write"
      ]
    }
  ],
  "x-notify-scopes": [
    "services:write"
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "url": {
              "type": "string",
              "maxLength": 2048,
              "format": "uri"
            },
            "preset": {
              "default": "generic",
              "type": "string",
              "enum": [
                "generic",
                "grok",
                "slack"
              ]
            },
            "headers": {
              "default": [],
              "maxItems": 16,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
                  },
                  "value": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  }
                },
                "required": [
                  "name",
                  "value"
                ]
              }
            },
            "events": {
              "minItems": 1,
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "interaction.answered",
                  "interaction.expired",
                  "interaction.canceled"
                ]
              }
            },
            "enabled": {
              "default": true,
              "type": "boolean"
            },
            "isDefault": {
              "default": false,
              "type": "boolean"
            }
          },
          "required": [
            "name",
            "url"
          ]
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ReplyWebhookCreated"
          }
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Missing, unknown, revoked, or expired token",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "The token lacks a required scope or the account lacks permission",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Not found for this account",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}
```

Resolve schema references against [OpenAPI](https://notify.belweave.ai/openapi.json).
