---
title: "Create a new webhook"
method: POST
path: "/webhooks"
tags: ["webhooks"]
---

# Create a new webhook

`POST /webhooks`

## Request

- Base URL: `https://cyber-risk.upguard.com/api/public`
- URL: `https://cyber-risk.upguard.com/api/public/webhooks`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/upguard/apis/upguard-cyberrisk-api/docs/webhooks/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new webhook subscribing to the provided list of notifications.

Required API key permissions: `Admin` (select when creating API key in Account Settings)

## Query parameters

- `name` string, required
- `hook_url` string, required
- `notification_type_ids` string[], required
- `webhook_type` 'webhook' | 'workflow_webhook'

## Response `201`

Information about the created webhook

- CreateWebhookResponsePayload
  - `id` string: The ID of the created webhook
  - `signing_secret` string: The HMAC signing secret for webhook authentication (hex-encoded, 64 characters). This is only returned once on creation. Webhooks will include an X-UpGuard-Signature header using this secret for authentication.

## Other responses

- `403`: Your API key does not have permission to perform this action.
- `422`: An invalid parameter was supplied or a mandatory parameter was missing
- `429`: Too many requests have been made to this endpoint.
- `500`: An internal system error occurred

---

[API](https://skmtc.dev/upguard/apis/upguard-cyberrisk-api.md) - [All operations](https://skmtc.dev/upguard/apis/upguard-cyberrisk-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upguard/apis/upguard-cyberrisk-api/revisions/d044bf6dc61e?raw)
