---
updatedAt: 2025-08-11T18:18:17.000Z
agentTools:
  projectIndex: https://docs.keycafe.com/llms.txt
---

# Create Webhook

Create a webhook with a POST request to the endpoint.

The post body should contain the necessary data to create the webhook as a JSON object:

```json json
{
    "url": "https://www.example.com/webhook-test",
    "username": "username",
    "password": "password"
}
```

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Keycafe API",
    "version": "0"
  },
  "x-explorer-enabled": true,
  "x-proxy-enabled": true,
  "x-samples-languages": [
    "shell",
    "python",
    "go"
  ],
  "servers": [
    {
      "url": "https://www.keycafe.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "BasicAuth": []
    }
  ],
  "paths": {
    "/v0/webhook": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "summary": "Create Webhook",
        "description": "Create a webhook with a POST request to the endpoint.",
        "operationId": "create-webhook",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "username",
                  "password"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "The webhook URL that the event data will be posted to. </br> Example: https://www.example.com/webhook-test"
                  },
                  "username": {
                    "type": "string",
                    "description": "The HTTP basic authentication username. </br> Example: Bob"
                  },
                  "password": {
                    "type": "string",
                    "description": "The HTTP basic authentication password."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Unique identifier for the webhook.",
                      "example": 123456
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "The destination URL that will receive webhook event notifications.",
                      "example": "https://www.example.com/webhook-test"
                    },
                    "username": {
                      "type": "string",
                      "description": "Username for HTTP Basic Authentication when delivering the webhook.",
                      "example": "username"
                    },
                    "password": {
                      "type": "string",
                      "description": "Password for HTTP Basic Authentication when delivering the webhook.",
                      "example": "password"
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": "{\n    \"id\": 123456,\n    \"url\": \"https://www.example.com/webhook-test\",\n    \"username\": \"username\",\n    \"password\": \"password\"\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```