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 referenceParameters
[
{
"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
{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hook",
"url"
],
"properties": {
"hook": {
"type": "string"
},
"url": {
"type": "string"
}
}
}
}
}
}
Responses
{
"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."
}
}
}
}
}
}
}
}