---
title: "Historical contract: Create Webhook"
description: "Historical Ordering.co API contract for POST /webhooks (Create Webhook), kept for reference. Use the current API reference for new integrations."
canonical: https://docs.ordering.co/api-reference/guides/history/create-webhook/
---

# Historical contract: Create Webhook

[]()

> **Historical API contract.** This page describes an earlier API contract. Methods, paths, and responses may differ from the current API.

## Historical meaning

Create Webhook

This API endpoint is used to add a webhook.

## Current API

For new integrations, use the linked current API reference or guide.

[View the current API reference](https://docs.ordering.co/api-reference/#tag/webhooks/POST/webhooks)

## Parameters

```json
[
  {
    "name": "language",
    "in": "path",
    "schema": {
      "type": "string",
      "default": "en"
    },
    "required": true
  },
  {
    "name": "project",
    "in": "path",
    "schema": {
      "type": "string",
      "default": "<redacted-personal>"
    },
    "required": true
  },
  {
    "name": "api_version",
    "in": "path",
    "schema": {
      "type": "string",
      "default": "v400"
    },
    "required": true
  }
]
```

## Request body

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "hook",
          "url"
        ],
        "properties": {
          "hook": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

## Responses

```json
{
  "200": {
    "description": "200",
    "content": {
      "application/json": {
        "examples": {
          "Result": {
            "value": "{\n  \"error\": false,\n  \"result\": {\n    \"url\": \"https://example.com/radar/9e7eauii4apb/42d9388f-7d65-4723-936a-adf085e1de2e/history/340b6176-beed-46dc-b6cf-6f8d8fc837b7\",\n    \"hook\": \"RUNSCOPE\",\n    \"id\": 1\n  }\n}"
          }
        },
        "schema": {
          "type": "object",
          "properties": {
            "error": {
              "type": "boolean",
              "example": false,
              "default": true
            },
            "result": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "example": "https://example.com/radar/9e7eauii4apb/42d9388f-7d65-4723-936a-adf085e1de2e/history/340b6176-beed-46dc-b6cf-6f8d8fc837b7"
                },
                "hook": {
                  "type": "string",
                  "example": "RUNSCOPE"
                },
                "id": {
                  "type": "integer",
                  "example": 1,
                  "default": 0
                }
              }
            }
          }
        }
      }
    }
  },
  "400": {
    "description": "400",
    "content": {
      "application/json": {
        "examples": {
          "Result": {
            "value": "{\n  \"error\": true,\n  \"result\": [\n    \"The Hook field is required.\",\n    \"The Url field is required.\"\n  ]\n}"
          }
        },
        "schema": {
          "type": "object",
          "properties": {
            "error": {
              "type": "boolean",
              "example": true,
              "default": true
            },
            "result": {
              "type": "array",
              "items": {
                "type": "string",
                "example": "The Hook field is required."
              }
            }
          }
        }
      }
    }
  },
  "401": {
    "description": "401",
    "content": {
      "application/json": {
        "examples": {
          "Result": {
            "value": "{\n  \"error\": true,\n  \"result\": [\n    \"You do not have permission.\"\n  ]\n}"
          }
        },
        "schema": {
          "type": "object",
          "properties": {
            "error": {
              "type": "boolean",
              "example": true,
              "default": true
            },
            "result": {
              "type": "array",
              "items": {
                "type": "string",
                "example": "You do not have permission."
              }
            }
          }
        }
      }
    }
  }
}
```
